|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Parses and provides access to the contents of .cfg files for the JavaEmitter. More...
Classes | |
| class | JavaCallbackDef |
| JavaCallback configuration definition (static) More... | |
| class | JavaCallbackInfo |
JavaCallback compile time information, produced by JavaEmitter#beginFunctions(TypeDictionary, TypeDictionary, Map) from function-pointer Types mapped to JavaConfiguration#getJavaCallbackList() names via TypeDictionary (typedef). More... | |
Public Member Functions | |
| JavaConfiguration () | |
| final void | read (final String filename) throws IOException |
| Reads the configuration file. More... | |
| void | setOutputRootDir (final String s) |
| String | libraryOnLoadName () |
Returns the library basename used to CCodeUnit#emitJNIOnLoadJNIEnvCode(String). More... | |
| String | packageName () |
| Returns the package name parsed from the configuration file. More... | |
| String | implPackageName () |
| Returns the implementation package name parsed from the configuration file. More... | |
| String | className () |
| Returns the class name parsed from the configuration file. More... | |
| String | implClassName () |
| Returns the implementation class name parsed from the configuration file. More... | |
| boolean | structsOnly () |
| String | javaOutputDir () |
| Returns the Java code output directory parsed from the configuration file. More... | |
| String | nativeOutputDir () |
| Returns the native code output directory parsed from the configuration file. More... | |
| boolean | nativeOutputUsesJavaHierarchy () |
| Returns whether the native code directory structure mirrors the Java hierarchy. More... | |
| boolean | tagNativeBinding () |
| Returns whether the comment of a native method binding should include a @native tag. More... | |
| boolean | relaxedEqualSemanticsTest () |
Returns whether TypeConfig.SemanticEqualityOp#equalSemantics(TypeConfig.SemanticEqualityOp) shall attempt to perform a relaxed semantic equality test, e.g. More... | |
| EmissionStyle | emissionStyle () |
| Returns the code emission style (constants in JavaEmitter) parsed from the configuration file. More... | |
| MethodAccess | accessControl (final String name) |
| Returns the access control for the given method-name or fully qualified class-name. More... | |
| String | gluegenRuntimePackage () |
| Returns the package in which the generated glue code expects to find its run-time helper classes (Buffers, Platform, StructAccessor). More... | |
| String | runtimeExceptionType () |
| Returns the kind of exception to raise if run-time checks fail in the generated code. More... | |
| String | unsupportedExceptionType () |
| Returns the kind of exception to raise if run-time checks fail in the generated code. More... | |
| List< String > | imports () |
| Returns the list of imports that should be emitted at the top of each .java file. More... | |
| TypeInfo | canonicalNameOpaque (final String canonicalName) |
If the given canonicalName should be considered opaque, returns the TypeInfo describing the replacement type. More... | |
| TypeInfo | typeInfo (Type type) |
| If this type should be considered opaque, returns the TypeInfo describing the replacement type. More... | |
| boolean | returnsString (final String functionName) |
Indicates whether the given function (which returns a char* in C) should be translated as returning a java.lang.String. More... | |
| boolean | returnsString (final AliasedSymbol symbol) |
Indicates whether the given function (which returns a char* in C) should be translated as returning a java.lang.String. More... | |
| boolean | returnsStringOnly (final String functionName) |
Indicates whether the given function (which returns a char* in C) should be translated as returning a java.lang.String only. More... | |
| List< JavaCallbackDef > | getJavaCallbackList () |
| Returns the list of all configured JavaCallback definitions. More... | |
| JavaCallbackDef | javaCallbackSetFuncToDef (final AliasedSymbol symbol) |
| Returns the configured JavaCallback definition mapped to the JavaCallback-Set-Function name. More... | |
| String | returnedArrayLength (final String symbol) |
| Returns a MessageFormat string of the Java expression calculating the number of elements in the returned array from the specified function name or struct-field array-size. More... | |
| boolean | maxOneElement (final String symbol) |
| Indicates whether the given symbol covers no or one single object. More... | |
| List< Integer > | stringArguments (final AliasedSymbol symbol) |
Returns a list of Integers which are the indices of const char* arguments that should be converted to Strings. More... | |
| List< JavaType.PascalStringElem > | pascalStringArgument (final AliasedSymbol symbol) |
Returns a list of PascalStringIdx which are tuples of indices of int len, const char* arguments that should be converted to Strings. More... | |
| boolean | isForceUsingNIOOnly4All () |
| void | addUseNIOOnly (final String fname) |
| boolean | useNIOOnly (final String functionName) |
Returns true if the given function should only create a java.nio variant, and no array variants, for void* and other C primitive pointers. More... | |
| void | addUseNIODirectOnly (final String fname) |
| boolean | useNIODirectOnly (final String functionName) |
Returns true if the given function should only create a java.nio variant, and no array variants, for void* and other C primitive pointers. More... | |
| List< String > | customJavaCodeForClass (final String className) |
| Returns a list of Strings containing user-implemented code for the given Java type name (not fully-qualified, only the class name); returns either null or an empty list if there is no custom code for the class. More... | |
| List< String > | customJNICodeForClass (final String className) |
| Returns a list of Strings containing user-implemented JNI code for the given Java type name (not fully-qualified, only the class name); returns either null or an empty list if there is no custom code for the class. More... | |
| List< String > | javadocForMethod (final String methodName) |
| List< String > | javadocForClass (final String className) |
| Returns a list of Strings containing Javadoc documentation for the given Java type name (not fully-qualified, only the class name); returns either null or an empty list if there is no Javadoc documentation for the class. More... | |
| String | packageForStruct (final String structName) |
| Returns the package into which to place the glue code for accessing the specified struct. More... | |
| List< String > | customCCode () |
| Returns, as a List of Strings, the custom C code to be emitted along with the glue code for the main class. More... | |
| List< String > | forcedStructs () |
| Returns, as a List of Strings, the structs for which glue code emission should be forced. More... | |
| String | returnStructMachineDataInfoIndex (final String structName) |
Returns a MessageFormat string of the Java code defining mdIdx, i.e. More... | |
| String | returnValueCapacity (final String functionName) |
| Returns a MessageFormat string of the C expression calculating the capacity of the java.nio.ByteBuffer being returned from a native method, or null if no expression has been specified. More... | |
| String | returnValueLength (final String symbol) |
| Returns a MessageFormat string of the C expression calculating the length of the array being returned from a native method. More... | |
| List< String > | temporaryCVariableDeclarations (final String functionName) |
| Returns a List of Strings of expressions declaring temporary C variables in the glue code for the specified function. More... | |
| List< String > | temporaryCVariableAssignments (final String functionName) |
| Returns a List of Strings of expressions containing assignments to temporary C variables in the glue code for the specified function. More... | |
| List< String > | extendedInterfaces (final String interfaceName) |
| Returns a List of Strings indicating the interfaces the passed interface should declare it extends. More... | |
| List< String > | implementedInterfaces (final String className) |
| Returns a List of Strings indicating the interfaces the passed class should declare it implements. More... | |
| String | extendedParentClass (final String className) |
| Returns a List of Strings indicating the interfaces the passed class should declare it implements. More... | |
| void | logIgnoresOnce () |
| void | logIgnores () |
| void | logRenamesOnce () |
| void | logRenames () |
| final boolean | immutableAccess (final AliasedSymbol symbol) |
| Returns true if the glue code for the given aliased symbol shall produce code for immutable access only. More... | |
| final boolean | immutableAccess (final String symbol) |
| Returns true if the glue code for the given symbol shall produce code for immutable access only. More... | |
| boolean | manuallyImplement (final String functionName) |
Variant of manuallyImplement(AliasedSymbol), where this method only considers the current-name of the given symbol, not the renamed-symbol. More... | |
| boolean | manuallyImplement (final AliasedSymbol symbol) |
| Returns true if the glue code for the given aliased function will be manually implemented by the end user. More... | |
| String | getDelegatedImplementation (final String functionName) |
Variant of getDelegatedImplementation(AliasedSymbol), where this method only considers the current-name of the given symbol, not the renamed-symbol. More... | |
| String | getDelegatedImplementation (final AliasedSymbol symbol) |
Returns the RENAMED-IMPL-SYMBOL if the implementation of the glue code of the given function shall be manually delegated by the end user. More... | |
| JavaType | getOpaqueReturnType (final String functionName) |
Variant of getOpaqueReturnType(AliasedSymbol), where this method only considers the current-name of the given symbol, not the renamed-symbol. More... | |
| JavaType | getOpaqueReturnType (final AliasedSymbol symbol) |
Returns the opaque JavaType for the given function AliasedSymbol or null if not opaque. More... | |
| final boolean | shouldIgnoreInInterface (final String symbol) |
Variant of shouldIgnoreInInterface(AliasedSymbol), where this method only considers the current-name of the given symbol, not the renamed-symbol. More... | |
| boolean | shouldIgnoreInInterface (final AliasedSymbol symbol) |
| Returns true if this aliased symbol should be ignored during glue code generation of interfaces and implementation. More... | |
| boolean | shouldIgnoreInImpl (final AliasedSymbol symbol) |
| Returns true if this aliased symbol should be ignored during glue code generation of implementation only. More... | |
| boolean | isUnimplemented (final AliasedSymbol symbol) |
| Returns true if this function should be given a body which throws a run-time exception with an "unimplemented" message during glue code generation. More... | |
| Set< String > | getAliasedDocNames (final AliasedSymbol symbol) |
| Return a set of aliased-name for comment in docs. More... | |
| String | renameJavaType (final String javaTypeName) |
| Returns a replacement name for this type, which should be the name of a Java wrapper class for a C struct, or the name unchanged if no RenameJavaType directive was specified for this type. More... | |
| String | getJavaSymbolRename (final String origName) |
| Returns a replacement name for this function or definition which should be used as the Java name for the bound method or constant. More... | |
| Set< String > | getRenamedJavaSymbols (final String aliasedName) |
Returns a set of replaced names to the given aliasedName. More... | |
| void | addJavaSymbolRename (final String origName, final String newName) |
| Programmatically adds a rename directive for the given symbol. More... | |
| void | addDelegateImplementation (final String origName, final String renamedImpl) |
| Programmatically adds a delegate implementation directive for the given symbol. More... | |
| boolean | allStatic () |
| Returns true if the emission style is AllStatic. More... | |
| boolean | emitInterface () |
| Returns true if an interface should be emitted during glue code generation. More... | |
| boolean | emitImpl () |
| Returns true if an implementing class should be emitted during glue code generation. More... | |
| List< String > | javaPrologueForMethod (final MethodBinding binding, final boolean forImplementingMethodCall, final boolean eraseBufferAndArrayTypes) |
| Returns a list of Strings which should be emitted as a prologue to the body for the Java-side glue code for the given method. More... | |
| List< String > | javaEpilogueForMethod (final MethodBinding binding, final boolean forImplementingMethodCall, final boolean eraseBufferAndArrayTypes) |
| Returns a list of Strings which should be emitted as an epilogue to the body for the Java-side glue code for the given method. More... | |
| void | readDelegateImplementation (final StringTokenizer tok, final String filename, final int lineNo) |
| TypeInfo | addTypeInfo (final String alias, final Type superType) |
Static Public Member Functions | |
| static< K, V > V | oneInMap (final Map< K, V > map, final Set< K > symbols) |
| static< K > boolean | oneInSet (final Set< K > set1, final Set< K > set2) |
| static String | canonicalStructFieldSymbol (final String structName, final String fieldName) |
| Returns the canonical configuration name for a struct field name, i.e. More... | |
Static Public Attributes | |
| static String | NEWLINE = System.getProperty("line.separator") |
Protected Member Functions | |
| final void | read (final String filename, final String linePrefix) throws IOException |
| Reads the specified file, treating each line as if it started with the specified string. More... | |
| final boolean | shouldIgnoreInInterface_Int (final AliasedSymbol symbol) |
| final boolean | shouldIgnoreInImpl_Int (final AliasedSymbol symbol) |
| void | dispatch (final String cmd, final StringTokenizer tok, final File file, final String filename, final int lineNo) throws IOException |
| String | readString (final String cmd, final StringTokenizer tok, final String filename, final int lineNo) |
| Boolean | readBoolean (final String cmd, final StringTokenizer tok, final String filename, final int lineNo) |
| Class<?> | stringToPrimitiveType (final String type) throws ClassNotFoundException |
| void | readAccessControl (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readOpaque (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readReturnsOpaque (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readReturnsString (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readReturnsStringOnly (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readReturnedArrayLength (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readMaxOneElement (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readJavaCallbackDef (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readJavaCallbackKey (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readExtendedIntfImplSymbols (final StringTokenizer tok, final String filename, final int lineNo, final boolean forInterface, final boolean forImplementation, final boolean onlyList) |
| void | readIgnore (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readUnignore (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readIgnoreNot (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readUnimplemented (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readIgnoreField (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readImmutableAccess (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readManuallyImplement (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readCustomJavaCode (final StringTokenizer tok, final String filename, final int lineNo) |
| void | addCustomJavaCode (final String className, final String code) |
| void | readCustomCCode (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readCustomJNICode (final StringTokenizer tok, final String filename, final int lineNo) |
| void | addCustomJNICode (final String className, final String code) |
| void | readMethodJavadoc (final StringTokenizer tok, final String filename, final int lineNo) |
| void | addMethodJavadoc (final String methodName, final String code) |
| void | readClassJavadoc (final StringTokenizer tok, final String filename, final int lineNo) |
| void | addClassJavadoc (final String className, final String code) |
| void | readArgumentIsString (final StringTokenizer tok, final String filename, final int lineNo) |
When const char* arguments in the C function prototypes are encountered, the emitter will normally convert them to byte[] arguments. More... | |
| void | readArgumentIsPascalString (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readStructPackage (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readStructMachineDataInfoIndex (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readReturnValueCapacity (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readReturnValueLength (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readTemporaryCVariableDeclaration (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readTemporaryCVariableAssignment (final StringTokenizer tok, final String filename, final int lineNo) |
| void | doInclude (final StringTokenizer tok, final File file, final String filename, final int lineNo) throws IOException |
| void | doIncludeAs (final StringTokenizer tok, final File file, final String filename, final int lineNo) throws IOException |
| void | readExtend (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readImplements (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readParentClass (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readRenameJavaType (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readRenameJavaSymbol (final StringTokenizer tok, final String filename, final int lineNo) |
| void | readJavaPrologueOrEpilogue (final StringTokenizer tok, final String filename, final int lineNo, final boolean prologue) |
| void | addJavaPrologueOrEpilogue (final String methodName, final String code, final boolean prologue) |
| void | readRangeCheck (final StringTokenizer tok, final String filename, final int lineNo, final boolean inBytes) |
| void | addTypeInfo (final TypeInfo info) |
Static Protected Member Functions | |
| static ASTLocusTag | getASTLocusTag (final AliasedSymbol s) |
| static TypeInfo | parseTypeInfo (final String cType, final JavaType javaType) |
| static boolean | startsWithDescriptor (final String s) |
Protected Attributes | |
| final LoggerIf | LOG |
Parses and provides access to the contents of .cfg files for the JavaEmitter.
Definition at line 63 of file JavaConfiguration.java.
| com.jogamp.gluegen.JavaConfiguration.JavaConfiguration | ( | ) |
| MethodAccess com.jogamp.gluegen.JavaConfiguration.accessControl | ( | final String | name | ) |
Returns the access control for the given method-name or fully qualified class-name.
Definition at line 389 of file JavaConfiguration.java.
|
protected |
Definition at line 1961 of file JavaConfiguration.java.
|
protected |
Definition at line 1901 of file JavaConfiguration.java.
|
protected |
Definition at line 1930 of file JavaConfiguration.java.
| void com.jogamp.gluegen.JavaConfiguration.addDelegateImplementation | ( | final String | origName, |
| final String | renamedImpl | ||
| ) |
Programmatically adds a delegate implementation directive for the given symbol.
Definition at line 1297 of file JavaConfiguration.java.
|
protected |
| void com.jogamp.gluegen.JavaConfiguration.addJavaSymbolRename | ( | final String | origName, |
| final String | newName | ||
| ) |
Programmatically adds a rename directive for the given symbol.
Definition at line 1281 of file JavaConfiguration.java.
|
protected |
Definition at line 1945 of file JavaConfiguration.java.
| TypeInfo com.jogamp.gluegen.JavaConfiguration.addTypeInfo | ( | final String | alias, |
| final Type | superType | ||
| ) |
Definition at line 2288 of file JavaConfiguration.java.
|
protected |
| void com.jogamp.gluegen.JavaConfiguration.addUseNIODirectOnly | ( | final String | fname | ) |
| void com.jogamp.gluegen.JavaConfiguration.addUseNIOOnly | ( | final String | fname | ) |
| boolean com.jogamp.gluegen.JavaConfiguration.allStatic | ( | ) |
Returns true if the emission style is AllStatic.
Definition at line 1307 of file JavaConfiguration.java.
| TypeInfo com.jogamp.gluegen.JavaConfiguration.canonicalNameOpaque | ( | final String | canonicalName | ) |
If the given canonicalName should be considered opaque, returns the TypeInfo describing the replacement type.
Returns null if this type should not be considered opaque.
If symbol references a struct fields, see canonicalStructFieldSymbol(String, String), it describes field's array-length or element-count referenced by a pointer.
Definition at line 433 of file JavaConfiguration.java.
|
static |
Returns the canonical configuration name for a struct field name, i.e.
'struct-name'.'field-name'
Definition at line 927 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.className | ( | ) |
Returns the class name parsed from the configuration file.
Definition at line 338 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.customCCode | ( | ) |
Returns, as a List of Strings, the custom C code to be emitted along with the glue code for the main class.
Definition at line 742 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.customJavaCodeForClass | ( | final String | className | ) |
Returns a list of Strings containing user-implemented code for the given Java type name (not fully-qualified, only the class name); returns either null or an empty list if there is no custom code for the class.
Definition at line 685 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.customJNICodeForClass | ( | final String | className | ) |
Returns a list of Strings containing user-implemented JNI code for the given Java type name (not fully-qualified, only the class name); returns either null or an empty list if there is no custom code for the class.
Definition at line 698 of file JavaConfiguration.java.
|
protected |
Reimplemented in com.jogamp.gluegen.procaddress.ProcAddressConfiguration.
Definition at line 1353 of file JavaConfiguration.java.
|
protected |
Definition at line 2117 of file JavaConfiguration.java.
|
protected |
Definition at line 2131 of file JavaConfiguration.java.
| EmissionStyle com.jogamp.gluegen.JavaConfiguration.emissionStyle | ( | ) |
Returns the code emission style (constants in JavaEmitter) parsed from the configuration file.
Definition at line 381 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.emitImpl | ( | ) |
Returns true if an implementing class should be emitted during glue code generation.
Definition at line 1317 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.emitInterface | ( | ) |
Returns true if an interface should be emitted during glue code generation.
Definition at line 1312 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.extendedInterfaces | ( | final String | interfaceName | ) |
Returns a List of Strings indicating the interfaces the passed interface should declare it extends.
May return null or a list of zero length if there are none.
Definition at line 807 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.extendedParentClass | ( | final String | className | ) |
Returns a List of Strings indicating the interfaces the passed class should declare it implements.
May return null or a list of zero length if there are none.
Definition at line 831 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.forcedStructs | ( | ) |
Returns, as a List of Strings, the structs for which glue code emission should be forced.
Definition at line 748 of file JavaConfiguration.java.
| Set< String > com.jogamp.gluegen.JavaConfiguration.getAliasedDocNames | ( | final AliasedSymbol | symbol | ) |
Return a set of aliased-name for comment in docs.
This is usually AliasedSymbol#addAliasedName(String), however an implementation may choose otherwise.
| symbol | the aliased symbol to retrieve the aliases |
null. Definition at line 1247 of file JavaConfiguration.java.
|
staticprotected |
| String com.jogamp.gluegen.JavaConfiguration.getDelegatedImplementation | ( | final AliasedSymbol | symbol | ) |
Returns the RENAMED-IMPL-SYMBOL if the implementation of the glue code of the given function shall be manually delegated by the end user.
DelegateImplementation <ORIG-SYMBOL> <RENAMED-IMPL-SYMBOL>
The interface is emitted unchanged.
The Java and native-code implementation is renamed to RENAMED-IMPL-SYMBOL. The user's manual implementation of ORIG-SYMBOL may delegate to RENAMED-IMPL-SYMBOL.
If symbol references a struct field or method, see canonicalStructFieldSymbol(String, String), it describes field's array-length or element-count referenced by a pointer.
Definition at line 1043 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.getDelegatedImplementation | ( | final String | functionName | ) |
Variant of getDelegatedImplementation(AliasedSymbol), where this method only considers the current-name of the given symbol, not the renamed-symbol.
Definition at line 1015 of file JavaConfiguration.java.
| List< JavaCallbackDef > com.jogamp.gluegen.JavaConfiguration.getJavaCallbackList | ( | ) |
Returns the list of all configured JavaCallback definitions.
Definition at line 577 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.getJavaSymbolRename | ( | final String | origName | ) |
Returns a replacement name for this function or definition which should be used as the Java name for the bound method or constant.
If a function, it still calls the originally-named C function under the hood. Returns null if this symbol has not been explicitly renamed.
Definition at line 1268 of file JavaConfiguration.java.
| JavaType com.jogamp.gluegen.JavaConfiguration.getOpaqueReturnType | ( | final AliasedSymbol | symbol | ) |
Returns the opaque JavaType for the given function AliasedSymbol or null if not opaque.
ReturnsOpaque <Primitive Java Type> <Function Name>
Definition at line 1079 of file JavaConfiguration.java.
| JavaType com.jogamp.gluegen.JavaConfiguration.getOpaqueReturnType | ( | final String | functionName | ) |
Variant of getOpaqueReturnType(AliasedSymbol), where this method only considers the current-name of the given symbol, not the renamed-symbol.
Definition at line 1063 of file JavaConfiguration.java.
| Set< String > com.jogamp.gluegen.JavaConfiguration.getRenamedJavaSymbols | ( | final String | aliasedName | ) |
Returns a set of replaced names to the given aliasedName.
Definition at line 1276 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.gluegenRuntimePackage | ( | ) |
Returns the package in which the generated glue code expects to find its run-time helper classes (Buffers, Platform, StructAccessor).
Defaults to "com.jogamp.gluegen.runtime".
Definition at line 401 of file JavaConfiguration.java.
| final boolean com.jogamp.gluegen.JavaConfiguration.immutableAccess | ( | final AliasedSymbol | symbol | ) |
Returns true if the glue code for the given aliased symbol shall produce code for immutable access only.
This is implemented for whole struct-type symbols or struct-field names, where no setter methods will be produced if marked immutable.
Definition at line 939 of file JavaConfiguration.java.
| final boolean com.jogamp.gluegen.JavaConfiguration.immutableAccess | ( | final String | symbol | ) |
Returns true if the glue code for the given symbol shall produce code for immutable access only.
This is implemented for whole struct-type symbols or struct-field names, where no setter methods will be produced if marked immutable.
Definition at line 960 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.implClassName | ( | ) |
Returns the implementation class name parsed from the configuration file.
Definition at line 343 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.implementedInterfaces | ( | final String | className | ) |
Returns a List of Strings indicating the interfaces the passed class should declare it implements.
May return null or a list of zero length if there are none.
Definition at line 819 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.implPackageName | ( | ) |
Returns the implementation package name parsed from the configuration file.
Definition at line 333 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.imports | ( | ) |
Returns the list of imports that should be emitted at the top of each .java file.
Definition at line 416 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.isForceUsingNIOOnly4All | ( | ) |
Definition at line 657 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.isUnimplemented | ( | final AliasedSymbol | symbol | ) |
Returns true if this function should be given a body which throws a run-time exception with an "unimplemented" message during glue code generation.
Definition at line 1225 of file JavaConfiguration.java.
| JavaCallbackDef com.jogamp.gluegen.JavaConfiguration.javaCallbackSetFuncToDef | ( | final AliasedSymbol | symbol | ) |
Returns the configured JavaCallback definition mapped to the JavaCallback-Set-Function name.
Definition at line 582 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.javadocForClass | ( | final String | className | ) |
Returns a list of Strings containing Javadoc documentation for the given Java type name (not fully-qualified, only the class name); returns either null or an empty list if there is no Javadoc documentation for the class.
Definition at line 720 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.javadocForMethod | ( | final String | methodName | ) |
| List< String > com.jogamp.gluegen.JavaConfiguration.javaEpilogueForMethod | ( | final MethodBinding | binding, |
| final boolean | forImplementingMethodCall, | ||
| final boolean | eraseBufferAndArrayTypes | ||
| ) |
Returns a list of Strings which should be emitted as an epilogue to the body for the Java-side glue code for the given method.
Returns null if no epilogue was specified.
Definition at line 1338 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.javaOutputDir | ( | ) |
Returns the Java code output directory parsed from the configuration file.
Definition at line 352 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.javaPrologueForMethod | ( | final MethodBinding | binding, |
| final boolean | forImplementingMethodCall, | ||
| final boolean | eraseBufferAndArrayTypes | ||
| ) |
Returns a list of Strings which should be emitted as a prologue to the body for the Java-side glue code for the given method.
Returns null if no prologue was specified.
Definition at line 1324 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.libraryOnLoadName | ( | ) |
Returns the library basename used to CCodeUnit#emitJNIOnLoadJNIEnvCode(String).
Definition at line 323 of file JavaConfiguration.java.
| void com.jogamp.gluegen.JavaConfiguration.logIgnores | ( | ) |
Definition at line 843 of file JavaConfiguration.java.
| void com.jogamp.gluegen.JavaConfiguration.logIgnoresOnce | ( | ) |
Definition at line 835 of file JavaConfiguration.java.
| void com.jogamp.gluegen.JavaConfiguration.logRenames | ( | ) |
Definition at line 866 of file JavaConfiguration.java.
| void com.jogamp.gluegen.JavaConfiguration.logRenamesOnce | ( | ) |
Definition at line 858 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.manuallyImplement | ( | final AliasedSymbol | symbol | ) |
Returns true if the glue code for the given aliased function will be manually implemented by the end user.
Both, the current-name and all aliases shall be considered.
If symbol references a struct field or method, see canonicalStructFieldSymbol(String, String), it describes field's array-length or element-count referenced by a pointer.
Definition at line 995 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.manuallyImplement | ( | final String | functionName | ) |
Variant of manuallyImplement(AliasedSymbol), where this method only considers the current-name of the given symbol, not the renamed-symbol.
Definition at line 973 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.maxOneElement | ( | final String | symbol | ) |
Indicates whether the given symbol covers no or one single object.
This is useful for struct-field pointer, indicating a null value holding no object or at most referincing memory for one single object.
Definition at line 617 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.nativeOutputDir | ( | ) |
Returns the native code output directory parsed from the configuration file.
Definition at line 357 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.nativeOutputUsesJavaHierarchy | ( | ) |
Returns whether the native code directory structure mirrors the Java hierarchy.
Definition at line 362 of file JavaConfiguration.java.
|
static |
|
static |
| String com.jogamp.gluegen.JavaConfiguration.packageForStruct | ( | final String | structName | ) |
Returns the package into which to place the glue code for accessing the specified struct.
Defaults to emitting into the regular package (i.e., the result of packageName).
Definition at line 732 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.packageName | ( | ) |
Returns the package name parsed from the configuration file.
Definition at line 328 of file JavaConfiguration.java.
| List< JavaType.PascalStringElem > com.jogamp.gluegen.JavaConfiguration.pascalStringArgument | ( | final AliasedSymbol | symbol | ) |
Returns a list of PascalStringIdx which are tuples of indices of int len, const char* arguments that should be converted to Strings.
Returns null if there are no such hints for the given function alias symbol.
Definition at line 642 of file JavaConfiguration.java.
| final void com.jogamp.gluegen.JavaConfiguration.read | ( | final String | filename | ) | throws IOException |
Reads the configuration file.
| filename | path to file that should be read |
Definition at line 232 of file JavaConfiguration.java.
|
protected |
Reads the specified file, treating each line as if it started with the specified string.
| filename | path to file that should be read |
| linePrefix | if not null, treat each line read as if it were prefixed with the specified string. |
Definition at line 242 of file JavaConfiguration.java.
|
protected |
|
protected |
|
protected |
When const char* arguments in the C function prototypes are encountered, the emitter will normally convert them to byte[] arguments.
This directive lets you specify which of those arguments should be converted to String arguments instead of byte[] .
For example, given the C prototype:
void FuncName(const char* ugh, int bar, const char *foo, const char* goop);
The emitter will normally emit:
public abstract void FuncName(byte[] ugh, int bar, byte[] foo, byte[] goop);
However, if you supplied the following directive:
ArgumentIsString FuncName 0 2
The emitter will instead emit:
public abstract void FuncName(String ugh, int bar, String foo, byte[] goop);
Definition at line 1995 of file JavaConfiguration.java.
|
protected |
|
protected |
Definition at line 1950 of file JavaConfiguration.java.
|
protected |
|
protected |
Definition at line 1886 of file JavaConfiguration.java.
|
protected |
Definition at line 1915 of file JavaConfiguration.java.
| void com.jogamp.gluegen.JavaConfiguration.readDelegateImplementation | ( | final StringTokenizer | tok, |
| final String | filename, | ||
| final int | lineNo | ||
| ) |
Definition at line 2206 of file JavaConfiguration.java.
|
protected |
|
protected |
Definition at line 1746 of file JavaConfiguration.java.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 2217 of file JavaConfiguration.java.
|
protected |
|
protected |
|
protected |
Definition at line 1935 of file JavaConfiguration.java.
|
protected |
Definition at line 1580 of file JavaConfiguration.java.
|
protected |
|
protected |
Definition at line 2250 of file JavaConfiguration.java.
|
protected |
Definition at line 2195 of file JavaConfiguration.java.
|
protected |
|
protected |
|
protected |
Definition at line 1603 of file JavaConfiguration.java.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| boolean com.jogamp.gluegen.JavaConfiguration.relaxedEqualSemanticsTest | ( | ) |
Returns whether TypeConfig.SemanticEqualityOp#equalSemantics(TypeConfig.SemanticEqualityOp) shall attempt to perform a relaxed semantic equality test, e.g.
skip the const and volatile qualifier
Definition at line 376 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.renameJavaType | ( | final String | javaTypeName | ) |
Returns a replacement name for this type, which should be the name of a Java wrapper class for a C struct, or the name unchanged if no RenameJavaType directive was specified for this type.
Definition at line 1255 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.returnedArrayLength | ( | final String | symbol | ) |
Returns a MessageFormat string of the Java expression calculating the number of elements in the returned array from the specified function name or struct-field array-size.
The literal 1 indicates a constant single object.
If symbol references a struct fields, see canonicalStructFieldSymbol(String, String), it describes field's array-length or element-count referenced by a pointer.
In case of struct fields, this array length will also be used for the native C function, i.e. multiplied w/ sizeof(C-Type) and passed down to native code, if not overriden by either returnValueCapacity(String) or returnValueLength(String)!
Definition at line 608 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.returnsString | ( | final AliasedSymbol | symbol | ) |
Indicates whether the given function (which returns a char* in C) should be translated as returning a java.lang.String.
Definition at line 564 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.returnsString | ( | final String | functionName | ) |
Indicates whether the given function (which returns a char* in C) should be translated as returning a java.lang.String.
Definition at line 558 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.returnsStringOnly | ( | final String | functionName | ) |
Indicates whether the given function (which returns a char* in C) should be translated as returning a java.lang.String only.
Excluding other variants for struct field access.
Definition at line 572 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.returnStructMachineDataInfoIndex | ( | final String | structName | ) |
Returns a MessageFormat string of the Java code defining mdIdx, i.e.
the index of the static MachineDescriptor index for structs.
If undefined, code generation uses the default expression:
private static final int mdIdx = MachineDataInfoRuntime.getStatic().ordinal();
Definition at line 762 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.returnValueCapacity | ( | final String | functionName | ) |
Returns a MessageFormat string of the C expression calculating the capacity of the java.nio.ByteBuffer being returned from a native method, or null if no expression has been specified.
If symbol references a struct fields, see canonicalStructFieldSymbol(String, String), it describes field's array-length or element-count referenced by a pointer.
Definition at line 775 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.returnValueLength | ( | final String | symbol | ) |
Returns a MessageFormat string of the C expression calculating the length of the array being returned from a native method.
If symbol references a struct fields, see canonicalStructFieldSymbol(String, String), it describes field's array-length or element-count referenced by a pointer.
Definition at line 787 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.runtimeExceptionType | ( | ) |
Returns the kind of exception to raise if run-time checks fail in the generated code.
Definition at line 406 of file JavaConfiguration.java.
| void com.jogamp.gluegen.JavaConfiguration.setOutputRootDir | ( | final String | s | ) |
| boolean com.jogamp.gluegen.JavaConfiguration.shouldIgnoreInImpl | ( | final AliasedSymbol | symbol | ) |
Returns true if this aliased symbol should be ignored during glue code generation of implementation only.
Both, the current-name and all aliases shall be considered.
Implementation calls shouldIgnoreInImpl_Int(AliasedSymbol) and overriding implementations shall ensure its being called as well!
| symbol | the symbolic aliased name to check for exclusion |
Definition at line 1156 of file JavaConfiguration.java.
|
protected |
Definition at line 1160 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.shouldIgnoreInInterface | ( | final AliasedSymbol | symbol | ) |
Returns true if this aliased symbol should be ignored during glue code generation of interfaces and implementation.
Both, the current-name and all aliases shall be considered.
Implementation calls shouldIgnoreInInterface_Int(AliasedSymbol) and overriding implementations shall ensure its being called as well!
| symbol | the symbolic aliased name to check for exclusion |
Definition at line 1114 of file JavaConfiguration.java.
| final boolean com.jogamp.gluegen.JavaConfiguration.shouldIgnoreInInterface | ( | final String | symbol | ) |
Variant of shouldIgnoreInInterface(AliasedSymbol), where this method only considers the current-name of the given symbol, not the renamed-symbol.
Definition at line 1098 of file JavaConfiguration.java.
|
protected |
Definition at line 1118 of file JavaConfiguration.java.
|
staticprotected |
| List< Integer > com.jogamp.gluegen.JavaConfiguration.stringArguments | ( | final AliasedSymbol | symbol | ) |
Returns a list of Integers which are the indices of const char* arguments that should be converted to Strings.
Returns null if there are no such hints for the given function alias symbol.
Definition at line 624 of file JavaConfiguration.java.
|
protected |
| boolean com.jogamp.gluegen.JavaConfiguration.structsOnly | ( | ) |
| boolean com.jogamp.gluegen.JavaConfiguration.tagNativeBinding | ( | ) |
Returns whether the comment of a native method binding should include a @native tag.
Definition at line 367 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.temporaryCVariableAssignments | ( | final String | functionName | ) |
Returns a List of Strings of expressions containing assignments to temporary C variables in the glue code for the specified function.
Definition at line 800 of file JavaConfiguration.java.
| List< String > com.jogamp.gluegen.JavaConfiguration.temporaryCVariableDeclarations | ( | final String | functionName | ) |
Returns a List of Strings of expressions declaring temporary C variables in the glue code for the specified function.
Definition at line 793 of file JavaConfiguration.java.
If this type should be considered opaque, returns the TypeInfo describing the replacement type.
Returns null if this type should not be considered opaque.
Definition at line 440 of file JavaConfiguration.java.
| String com.jogamp.gluegen.JavaConfiguration.unsupportedExceptionType | ( | ) |
Returns the kind of exception to raise if run-time checks fail in the generated code.
Definition at line 411 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.useNIODirectOnly | ( | final String | functionName | ) |
Returns true if the given function should only create a java.nio variant, and no array variants, for void* and other C primitive pointers.
NIO direct only does only allow direct Buffers. Implies useNIOOnly !
Definition at line 677 of file JavaConfiguration.java.
| boolean com.jogamp.gluegen.JavaConfiguration.useNIOOnly | ( | final String | functionName | ) |
Returns true if the given function should only create a java.nio variant, and no array variants, for void* and other C primitive pointers.
NIO only still allows usage of array backed not direct Buffers.
Definition at line 665 of file JavaConfiguration.java.
|
protected |
Definition at line 71 of file JavaConfiguration.java.
|
static |
Definition at line 73 of file JavaConfiguration.java.