|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
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. More...
Classes | |
| class | PascalStringElem |
| Pascal string argument index tuple for length and value. More... | |
Public Member Functions | |
| boolean | equals (final Object arg) |
| int | hashCode () |
| JavaType | getElementType () |
| Type | getElementCType () |
| Class<?> | getJavaClass () |
| Returns the Java Class corresponding to this type. More... | |
| String | getName () |
| Returns the Java type name corresponding to this type. More... | |
| String | getName (final JavaConfiguration cfg) |
| String | getDescriptor () |
| Returns the descriptor (internal type signature) corresponding to this type. More... | |
| String | getDescriptor (final JavaConfiguration cfg) |
| String | getJNIMethodDesciptor () |
| Returns the native (JNI) method-name descriptor corresponding to this type, i.e. More... | |
| String | 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.) More... | |
| boolean | isOpaqued () |
| boolean | isNIOBuffer () |
| boolean | isNIOByteBuffer () |
| boolean | isNIOByteBufferArray () |
| boolean | isNIOBufferArray () |
| boolean | isNIOLongBuffer () |
| boolean | isNIOPointerBuffer () |
| boolean | isString () |
| boolean | isPascalStrElem () |
| boolean | isPascalStr () |
| boolean | isPascalLen () |
| boolean | isArray () |
| boolean | isFloatArray () |
| boolean | isDoubleArray () |
| boolean | isByteArray () |
| boolean | isIntArray () |
| boolean | isShortArray () |
| boolean | isLongArray () |
| boolean | isStringArray () |
| boolean | isPascalStrArray () |
| boolean | isPrimitive () |
| boolean | isPrimitiveArray () |
| boolean | isShort () |
| boolean | isFloat () |
| boolean | isDouble () |
| boolean | isByte () |
| boolean | isLong () |
| boolean | isInt () |
| boolean | isVoid () |
| boolean | isNamedClass () |
| boolean | isCompoundTypeWrapper () |
| boolean | isArrayOfCompoundTypeWrappers () |
| boolean | isCPrimitivePointerType () |
| boolean | isCVoidPointerType () |
| boolean | isCCharPointerType () |
| boolean | isCShortPointerType () |
| boolean | isCInt32PointerType () |
| boolean | isCInt64PointerType () |
| boolean | isCFloatPointerType () |
| boolean | isCDoublePointerType () |
| boolean | isJNIEnv () |
| Object | clone () |
| String | toString () |
| final StringBuilder | getSignature (StringBuilder sb) |
| String | getDebugString () |
| JavaType (final JavaType o) | |
| Copy ctor. More... | |
| JavaType (final JavaType o, final PascalStringElem pascalStrElem) | |
| Copy ctor w/ pascalString variant override. More... | |
Static Public Member Functions | |
| static JavaType | createForOpaqueClass (final Class<?> clazz) |
| Creates a JavaType corresponding to the given opaque Java type. More... | |
| static JavaType | createForClass (final Class<?> clazz) |
| Creates a JavaType corresponding to the given Java type. More... | |
| static JavaType | createForStringClass (final Class<?> clazz, final PascalStringElem pascalStrElem) |
| static JavaType | createForNamedClass (final String name) |
| Creates a JavaType corresponding to the given named Java class, not necessarily existing yet. More... | |
| static JavaType | createForCStruct (final 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. More... | |
| static JavaType | createForCArray (final Type elementType) |
| Creates a JavaType corresponding to an array of the given element type. More... | |
| static JavaType | createForCVoidPointer () |
| static JavaType | createForCCharPointer () |
| static JavaType | createForCShortPointer () |
| static JavaType | createForCInt32Pointer () |
| static JavaType | createForCInt64Pointer () |
| static JavaType | createForCFloatPointer () |
| static JavaType | createForCDoublePointer () |
| static JavaType | createForJNIEnv () |
| static JavaType | forObjectClass () |
| static JavaType | forNIOBufferClass () |
| static JavaType | forNIOByteBufferClass () |
| static JavaType | forNIOShortBufferClass () |
| static JavaType | forNIOIntBufferClass () |
| static JavaType | forNIOLongBufferClass () |
| static JavaType | forNIOPointerBufferClass () |
| static JavaType | forNIOFloatBufferClass () |
| static JavaType | forNIODoubleBufferClass () |
| static JavaType | forNIOByteBufferArrayClass () |
| static StringBuilder | appendDescriptor (final StringBuilder buf, final Class<?> c, final boolean useTrueType) |
| Appends the descriptor (internal type signature) corresponding to the given Class<?> c. More... | |
| static StringBuilder | appendJNIDescriptor (final StringBuilder res, final Class<?> c, final boolean useTrueType) |
| Appends the native (JNI) method-name descriptor corresponding to the given Class<?> c, i.e. More... | |
| static String | toJNIMethodDescriptor (final String descriptor) |
| Converts the assumed descriptor (internal type signature) to a native (JNI) method-name descriptor, i.e. More... | |
| static StringBuilder | toJNIMethodDescriptor (final StringBuilder descriptor, final int start) |
| Converts the assumed descriptor (internal type signature) to a native (JNI) method-name descriptor, i.e. More... | |
Public Attributes | |
| final PascalStringElem | pascalStrElem |
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.
Definition at line 54 of file JavaType.java.
| com.jogamp.gluegen.JavaType.JavaType | ( | final JavaType | o | ) |
Copy ctor.
Definition at line 929 of file JavaType.java.
| com.jogamp.gluegen.JavaType.JavaType | ( | final JavaType | o, |
| final PascalStringElem | pascalStrElem | ||
| ) |
Copy ctor w/ pascalString variant override.
Definition at line 933 of file JavaType.java.
|
static |
Appends the descriptor (internal type signature) corresponding to the given Class<?> c.
| buf | the StringBuilder sink |
| c | the Class<?> to append the descriptor for |
| useTrueType | if true, use the actual Class<?> name for non primitives, otherwise java.lang.Object will be used (flattened) |
Definition at line 407 of file JavaType.java.
|
static |
Appends the native (JNI) method-name descriptor corresponding to the given Class<?> c, i.e.
replacing chars appendDescriptor(StringBuilder, Class, boolean) as follows
_ -> _1 / -> _ ; -> _2 [ -> _3 Only the newly appended segment to the StringBuilder sink will be converted to (JNI) method-name using toJNIMethodDescriptor(StringBuilder, int).
| buf | the StringBuilder sink |
| c | the Class<?> to append the descriptor for |
| useTrueType | if true, use the actual Class<?> name for non primitives, otherwise java.lang.Object will be used (flattened) |
Definition at line 471 of file JavaType.java.
| Object com.jogamp.gluegen.JavaType.clone | ( | ) |
Definition at line 751 of file JavaType.java.
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.
Definition at line 222 of file JavaType.java.
|
static |
Definition at line 230 of file JavaType.java.
|
static |
Definition at line 250 of file JavaType.java.
|
static |
Definition at line 246 of file JavaType.java.
|
static |
Definition at line 238 of file JavaType.java.
|
static |
Definition at line 242 of file JavaType.java.
|
static |
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.
Definition at line 197 of file JavaType.java.
|
static |
Definition at line 234 of file JavaType.java.
|
static |
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.
Definition at line 215 of file JavaType.java.
|
static |
Definition at line 226 of file JavaType.java.
|
static |
|
static |
Creates a JavaType corresponding to the given named Java class, not necessarily existing yet.
Definition at line 208 of file JavaType.java.
|
static |
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.
Definition at line 189 of file JavaType.java.
|
static |
Definition at line 200 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.equals | ( | final Object | arg | ) |
Definition at line 138 of file JavaType.java.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| String com.jogamp.gluegen.JavaType.getDebugString | ( | ) |
Definition at line 841 of file JavaType.java.
| String com.jogamp.gluegen.JavaType.getDescriptor | ( | ) |
Returns the descriptor (internal type signature) corresponding to this type.
Definition at line 362 of file JavaType.java.
| String com.jogamp.gluegen.JavaType.getDescriptor | ( | final JavaConfiguration | cfg | ) |
| Type com.jogamp.gluegen.JavaType.getElementCType | ( | ) |
| JavaType com.jogamp.gluegen.JavaType.getElementType | ( | ) |
Definition at line 178 of file JavaType.java.
| Class<?> com.jogamp.gluegen.JavaType.getJavaClass | ( | ) |
Returns the Java Class corresponding to this type.
Returns null if this object corresponds to a C primitive array type.
Definition at line 332 of file JavaType.java.
| String com.jogamp.gluegen.JavaType.getJNIMethodDesciptor | ( | ) |
Returns the native (JNI) method-name descriptor corresponding to this type, i.e.
replacing chars getDescriptor() as follows
_ -> _1 / -> _ ; -> _2 [ -> _3 Definition at line 396 of file JavaType.java.
| String com.jogamp.gluegen.JavaType.getName | ( | ) |
Returns the Java type name corresponding to this type.
Definition at line 339 of file JavaType.java.
| String com.jogamp.gluegen.JavaType.getName | ( | final JavaConfiguration | cfg | ) |
| final StringBuilder com.jogamp.gluegen.JavaType.getSignature | ( | StringBuilder | sb | ) |
Definition at line 770 of file JavaType.java.
| int com.jogamp.gluegen.JavaType.hashCode | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isArray | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isArrayOfCompoundTypeWrappers | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isByte | ( | ) |
Definition at line 685 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isByteArray | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isCCharPointerType | ( | ) |
Definition at line 722 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isCDoublePointerType | ( | ) |
Definition at line 742 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isCFloatPointerType | ( | ) |
Definition at line 738 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isCInt32PointerType | ( | ) |
Definition at line 730 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isCInt64PointerType | ( | ) |
Definition at line 734 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isCompoundTypeWrapper | ( | ) |
Definition at line 705 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isCPrimitivePointerType | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isCShortPointerType | ( | ) |
Definition at line 726 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isCVoidPointerType | ( | ) |
Definition at line 718 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isDouble | ( | ) |
Definition at line 681 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isDoubleArray | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isFloat | ( | ) |
Definition at line 677 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isFloatArray | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isInt | ( | ) |
Definition at line 693 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isIntArray | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isJNIEnv | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isLong | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isLongArray | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isNamedClass | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isNIOBuffer | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isNIOBufferArray | ( | ) |
Definition at line 609 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isNIOByteBuffer | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isNIOByteBufferArray | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isNIOLongBuffer | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isNIOPointerBuffer | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isOpaqued | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isPascalLen | ( | ) |
Definition at line 629 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isPascalStr | ( | ) |
Definition at line 627 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isPascalStrArray | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isPascalStrElem | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isPrimitive | ( | ) |
Definition at line 665 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isPrimitiveArray | ( | ) |
Definition at line 669 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isShort | ( | ) |
Definition at line 673 of file JavaType.java.
| boolean com.jogamp.gluegen.JavaType.isShortArray | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isString | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isStringArray | ( | ) |
| boolean com.jogamp.gluegen.JavaType.isVoid | ( | ) |
| String com.jogamp.gluegen.JavaType.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.)
Definition at line 528 of file JavaType.java.
|
static |
Converts the assumed descriptor (internal type signature) to a native (JNI) method-name descriptor, i.e.
replacing chars getDescriptor() as follows
_ -> _1 / -> _ ; -> _2 [ -> _3 | descriptor | the char sequence holding the original descriptor |
Definition at line 488 of file JavaType.java.
|
static |
Converts the assumed descriptor (internal type signature) to a native (JNI) method-name descriptor, i.e.
replacing chars getDescriptor() as follows
_ -> _1 / -> _ ; -> _2 [ -> _3 | descriptor | the char buffer holding the original descriptor |
| start | start position of the segment to convert, use 0 if whole buffr shall be converted |
Definition at line 509 of file JavaType.java.
| String com.jogamp.gluegen.JavaType.toString | ( | ) |
| final PascalStringElem com.jogamp.gluegen.JavaType.pascalStrElem |
Definition at line 124 of file JavaType.java.