JNIpp 1.0
JNI meets C++
java Namespace Reference

Contains java::Object and basic wrapper classes. More...

Classes

class  PrimitiveArray
 Wrapper for primitive arrays (like int[]). More...
class  ObjectArray
 Wrapper template for object arrays. More...
class  Class
 Wrapper for java.lang.Class. More...
class  CharSequence
 Wrapper for java.lang.CharSequence. More...
class  String
 Wrapper for java.lang.String. More...
class  Throwable
 Wrapper for java.lang.Throwable. More...
class  Exception
 Wrapper for java.lang.Exception. More...
class  RuntimeException
 Wrapper for java.lang.RuntimeException. More...
class  Object
 The Object class, root of all. More...
class  ObjectPointer
 Smart pointer for classes derived from Object. More...

Typedefs

typedef PrimitiveArray< bool > BoolArray
 Array of booleans (boolean[]) which uses C++ bool values.
typedef ObjectPointer< BoolArray > PBoolArray
 Pointer to BoolArray.
typedef PrimitiveArray< bool > BooleanArray
 Array of booleans (boolean[]); see also BoolArray.
typedef ObjectPointer
< BooleanArray > 
PBooleanArray
 Pointer to BooleanArray.
typedef PrimitiveArray< jbyte > ByteArray
 Array of bytes (byte[]).
typedef ObjectPointer< ByteArray > PByteArray
 Pointer to ByteArray.
typedef PrimitiveArray< jchar > CharArray
 Array of chars (char[]).
typedef ObjectPointer< CharArray > PCharArray
 Pointer to CharArray.
typedef PrimitiveArray< jshort > ShortArray
 Array of short integers (short[]).
typedef ObjectPointer< ShortArray > PShortArray
 Pointer to ShortArray.
typedef PrimitiveArray< jint > IntArray
 Array of integers (int[]).
typedef ObjectPointer< IntArray > PIntArray
 Pointer to IntArray.
typedef PrimitiveArray< jlong > LongArray
 Array of long integers (long[]).
typedef ObjectPointer< LongArray > PLongArray
 Pointer to LongArray.
typedef PrimitiveArray< jfloat > FloatArray
 Array of floats (float[]).
typedef ObjectPointer< FloatArray > PFloatArray
 Pointer to FloatArray.
typedef PrimitiveArray< jdouble > DoubleArray
 Array of doubles (double[]).
typedef ObjectPointer
< DoubleArray > 
PDoubleArray
 Pointer to DoubleArray.
typedef ObjectPointer
< ObjectArray< Object > > 
PObjectArray
 Pointer to ObjectArray<Object>.
typedef ObjectArray< String > StringArray
 Array of strings (String[]).
typedef ObjectPointer
< StringArray > 
PStringArray
 Pointer to StringArray.
typedef ObjectPointer< String > PString
 Pointer to String.
typedef ObjectPointer< Class > PClass
 Pointer to Class.
typedef ObjectPointer
< CharSequence > 
PCharSequence
 Pointer to CharSequence.
typedef ObjectPointer< Throwable > PThrowable
 Pointer to Throwable.
typedef ObjectPointer< Exception > PException
 Pointer to Exception.
typedef ObjectPointer
< RuntimeException > 
PRuntimeException
 Pointer to RuntimeException.
typedef ObjectPointer< Object > PObject
 Pointer to Object.

Functions

template<class OtherObjectType >
bool IsInstanceOf (const jni::AbstractObject &object)
 Checks whether object can be cast to OtherObjectType.
template<class OtherObjectType >
ObjectPointer< OtherObjectType > Cast (const jni::AbstractObject &object)
 Checks and casts object to OtherObjectType.

Detailed Description

Contains java::Object and basic wrapper classes.


Function Documentation

template<class OtherObjectType >
ObjectPointer< typename ObjectTypeExtractor< OtherObjectType >::Type > java::Cast ( const jni::AbstractObject &  object)

Checks and casts object to OtherObjectType.

If check (see IsInstanceOf()) fails function throws java.lang.ClassCastException.