|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
C code unit (a generated C source file), covering multiple FunctionEmitter allowing to unify output, decoration and dynamic helper code injection per unit.
More...
Public Member Functions | |
| CCodeUnit (final String filename, final String cUnitName, final Object generator) throws IOException | |
| void | emitHeader (final String packageName, final String className, final List< String > customCode) |
| void | emitJNIEnvDecl () |
Emits getJNIEnvDecl(). More... | |
| void | emitJNIOnLoadJNIEnvCode (final String libraryBasename) |
Emits getJNIOnLoadJNIEnvCode(String). More... | |
| String | toString () |
Public Member Functions inherited from com.jogamp.gluegen.CodeUnit | |
| boolean | addTailCode (final String c) |
| Add a tail code to this unit. More... | |
| void | emitln () |
| void | emitln (final String s) |
| void | emit (final String s) |
| void | emitf (final String s, final Object... args) |
| void | emitTailCode () |
| void | close () |
| String | toString () |
Static Public Member Functions | |
| static final String | getJNIEnvDecl () |
Returns native JNI declarations for JVMUtil_GetJavaVM(), JVMUtil_GetJNIEnv(..) and JVMUtil_ReleaseJNIEnv(..). More... | |
| static final String | getJNIOnLoadJNIEnvCode (final String libraryBasename) |
Returns native JNI code JNI_OnLoad(..) used for dynamic libraries, JNI_OnLoad_{libraryBasename}(..) used for static libraries, JVMUtil_GetJNIEnv(..) etc. More... | |
Public Attributes | |
| final String | cUnitName |
| base c-unit name with suffix. More... | |
Public Attributes inherited from com.jogamp.gluegen.CodeUnit | |
| final String | filename |
| final PrintWriter | output |
Static Public Attributes | |
| static final String | NewDirectByteBufferCopyUnitCode |
Additional Inherited Members | |
Protected Member Functions inherited from com.jogamp.gluegen.CodeUnit | |
| CodeUnit (final String filename, final Object generator) throws IOException | |
C code unit (a generated C source file), covering multiple FunctionEmitter allowing to unify output, decoration and dynamic helper code injection per unit.
Definition at line 37 of file CCodeUnit.java.
| com.jogamp.gluegen.CCodeUnit.CCodeUnit | ( | final String | filename, |
| final String | cUnitName, | ||
| final Object | generator | ||
| ) | throws IOException |
| filename | the class's full filename to open w/ write access |
| cUnitName | the base c-unit name, i.e. c-file basename with suffix |
| generator | informal optional object that is creating this unit, used to be mentioned in a warning message if not null. |
| IOException |
Definition at line 47 of file CCodeUnit.java.
| void com.jogamp.gluegen.CCodeUnit.emitHeader | ( | final String | packageName, |
| final String | className, | ||
| final List< String > | customCode | ||
| ) |
Definition at line 53 of file CCodeUnit.java.
| void com.jogamp.gluegen.CCodeUnit.emitJNIEnvDecl | ( | ) |
Emits getJNIEnvDecl().
Definition at line 77 of file CCodeUnit.java.
| void com.jogamp.gluegen.CCodeUnit.emitJNIOnLoadJNIEnvCode | ( | final String | libraryBasename | ) |
Emits getJNIOnLoadJNIEnvCode(String).
Definition at line 82 of file CCodeUnit.java.
|
static |
Returns native JNI declarations for JVMUtil_GetJavaVM(), JVMUtil_GetJNIEnv(..) and JVMUtil_ReleaseJNIEnv(..).
See getJNIOnLoadJNIEnvCode(String) for details.
Definition at line 118 of file CCodeUnit.java.
|
static |
Returns native JNI code JNI_OnLoad(..) used for dynamic libraries, JNI_OnLoad_{libraryBasename}(..) used for static libraries, JVMUtil_GetJNIEnv(..) etc.
The JNI_OnLoad*(..) methods set a static JavaVM* {libraryBasename}_jvmHandle, which in turn is utilized by JVMUtil_GetJNIEnv(..) to attach a new thread to the JavaVM* generating a new JNIEnv*- or just to retrieve the thread's JNIEnv*, if already attached to the JavaVM*.
| libraryBasename | library basename to generate the JNI_OnLoad_{libraryBasename}(..) variant for statically linked libraries. |
Definition at line 137 of file CCodeUnit.java.
| String com.jogamp.gluegen.CCodeUnit.toString | ( | ) |
Reimplemented from com.jogamp.gluegen.CodeUnit.
Definition at line 87 of file CCodeUnit.java.
| final String com.jogamp.gluegen.CCodeUnit.cUnitName |
base c-unit name with suffix.
Definition at line 39 of file CCodeUnit.java.
|
static |
Definition at line 89 of file CCodeUnit.java.