Package com.jogamp.gluegen
Class JavaType
java.lang.Object
com.jogamp.gluegen.JavaType
Describes a java-side representation of a type that is used to represent
the same data on both the Java-side and C-side during a JNI operation. Also
contains some utility methods for creating common types.
-
Method Summary
Modifier and TypeMethodDescriptionclone()static JavaTypecreateForCArray(Type elementType) Creates a JavaType corresponding to an array of the given element type.static JavaTypestatic JavaTypestatic JavaTypestatic JavaTypestatic JavaTypestatic JavaTypecreateForClass(Class<?> clazz) Creates a JavaType corresponding to the given Java type.static JavaTypestatic JavaTypecreateForCStruct(String name) Creates a JavaType corresponding to the specified C CompoundType name; for example, if "Foo" is supplied, then this JavaType represents a "Foo *" by way of a StructAccessor.static JavaTypestatic JavaTypestatic JavaTypecreateForOpaqueClass(Class<?> clazz) Creates a JavaType corresponding to the given opaque Java type.booleanstatic JavaTypestatic JavaTypestatic JavaTypestatic JavaTypestatic JavaTypestatic JavaTypestatic JavaTypestatic JavaTypestatic JavaTypeReturns the descriptor (internal type signature) corresponding to this type.Class<?>Returns the Java Class corresponding to this type.getName()Returns the Java type name corresponding to this type.inthashCode()booleanisArray()booleanbooleanisByte()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisDouble()booleanbooleanisFloat()booleanbooleanisInt()booleanbooleanisJNIEnv()booleanisLong()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisShort()booleanbooleanisString()booleanbooleanisVoid()Returns the String corresponding to the JNI type for this type, or NULL if it can't be represented (i.e., it's a boxing class that we need to call getBuffer() on.)toString()
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getElementType
-
getElementCType
-
createForOpaqueClass
Creates a JavaType corresponding to the given opaque Java type. This can be used to represent arrays of primitive values or Strings; the emitters understand how to perform proper conversion from the corresponding C type. -
createForClass
Creates a JavaType corresponding to the given Java type. This can be used to represent arrays of primitive values or Strings; the emitters understand how to perform proper conversion from the corresponding C type. -
createForCStruct
Creates a JavaType corresponding to the specified C CompoundType name; for example, if "Foo" is supplied, then this JavaType represents a "Foo *" by way of a StructAccessor. -
createForCArray
Creates a JavaType corresponding to an array of the given element type. This is used to represent arrays of "Foo **" which should be mapped to Foo[] in Java. -
createForCVoidPointer
-
createForCCharPointer
-
createForCShortPointer
-
createForCInt32Pointer
-
createForCInt64Pointer
-
createForCFloatPointer
-
createForCDoublePointer
-
createForJNIEnv
-
forNIOBufferClass
-
forNIOByteBufferClass
-
forNIOShortBufferClass
-
forNIOIntBufferClass
-
forNIOLongBufferClass
-
forNIOPointerBufferClass
-
forNIOFloatBufferClass
-
forNIODoubleBufferClass
-
forNIOByteBufferArrayClass
-
getJavaClass
Returns the Java Class corresponding to this type. Returns null if this object corresponds to a C primitive array type. -
getName
Returns the Java type name corresponding to this type. -
getDescriptor
Returns the descriptor (internal type signature) corresponding to this type. -
jniTypeName
Returns the String corresponding to the JNI type for this type, or NULL if it can't be represented (i.e., it's a boxing class that we need to call getBuffer() on.) -
isOpaqued
public boolean isOpaqued() -
isNIOBuffer
public boolean isNIOBuffer() -
isNIOByteBuffer
public boolean isNIOByteBuffer() -
isNIOByteBufferArray
public boolean isNIOByteBufferArray() -
isNIOBufferArray
public boolean isNIOBufferArray() -
isNIOLongBuffer
public boolean isNIOLongBuffer() -
isNIOPointerBuffer
public boolean isNIOPointerBuffer() -
isString
public boolean isString() -
isArray
public boolean isArray() -
isFloatArray
public boolean isFloatArray() -
isDoubleArray
public boolean isDoubleArray() -
isByteArray
public boolean isByteArray() -
isIntArray
public boolean isIntArray() -
isShortArray
public boolean isShortArray() -
isLongArray
public boolean isLongArray() -
isStringArray
public boolean isStringArray() -
isPrimitive
public boolean isPrimitive() -
isPrimitiveArray
public boolean isPrimitiveArray() -
isShort
public boolean isShort() -
isFloat
public boolean isFloat() -
isDouble
public boolean isDouble() -
isByte
public boolean isByte() -
isLong
public boolean isLong() -
isInt
public boolean isInt() -
isVoid
public boolean isVoid() -
isCompoundTypeWrapper
public boolean isCompoundTypeWrapper() -
isArrayOfCompoundTypeWrappers
public boolean isArrayOfCompoundTypeWrappers() -
isCPrimitivePointerType
public boolean isCPrimitivePointerType() -
isCVoidPointerType
public boolean isCVoidPointerType() -
isCCharPointerType
public boolean isCCharPointerType() -
isCShortPointerType
public boolean isCShortPointerType() -
isCInt32PointerType
public boolean isCInt32PointerType() -
isCInt64PointerType
public boolean isCInt64PointerType() -
isCFloatPointerType
public boolean isCFloatPointerType() -
isCDoublePointerType
public boolean isCDoublePointerType() -
isJNIEnv
public boolean isJNIEnv() -
clone
-
toString
-
getDebugString
-