Bug 1442

Summary: GlueGen: Parse inner classes & interfaces of Java source files
Product: [JogAmp] Gluegen Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Mathieu Féry (MathiusD) <mfery>
Status: RESOLVED FIXED    
Severity: normal CC: mfery
Priority: P4    
Version: 2.5.0   
Hardware: All   
OS: all   
Type: FEATURE SCM Refs:
2abb40b0ca9a6a06bdbe3e66b4235301ed15c693 0e6d18c6b6d46b54e679ce0c44613e21e58245f2
Workaround: ---
Bug Depends on:    
Bug Blocks: 1435    

Description Sven Gothel 2023-08-07 13:38:56 CEST
GlueGen's own JavaParsert.g (antlr) shall support inner classes and interfaces as generated by its own JavaCallback feature, see Bug 1435.
Comment 1 Sven Gothel 2023-08-07 13:42:25 CEST
Mathieu Féry added this features in commit 2abb40b0ca9a6a06bdbe3e66b4235301ed15c693.

Detailed message in commit 0e6d18c6b6d46b54e679ce0c44613e21e58245f2

* Add tests with each emitters for test2, but tests are shared and run for each emitters
* Update JavaParser.g to allow parsing of bindings generated after test2 processing
  * Add basic management of generic type (But not yet retrieved inside classTypeSpec args)
  * Add basic management of annotations (with or w/o parameter(s)) (Retrieved in statement, classes and interfaces but not used)
* Align lexer constants in JavaParser.g
* Update JavaParser.g to allow fetching all inner classes and inner interfaces to allow excluding by ExtendedInterfaceSymbolsIgnore
Comment 3 Mathieu Féry (MathiusD) 2023-08-07 23:35:29 CEST
Retrieve Inner Interfaces and Classes was made necessary by the Java Callback generation (Bug 1435) functionality. Java Callback generate some interfaces to allow submit dedicated Java Callback to specifics C function and use some inner classes to manage this callbacks (Key Classes).

Additional notes :
Java Callback need this modification because generate some inner interfaces and classes are generated.

Parsing such files is necessary when using the following directives (Cf documentation related here: https://jogamp.org/gluegen/doc/GlueGen_Mapping.html#oo-style-api-interface-mapping):
 * ExtendedInterfaceSymbolsIgnore
 * ExtendedInterfaceSymbolsOnly
 * ExtendedImplementationSymbolsIgnore
 * ExtendedImplementationSymbolsOnly
 * ExtendedIntfAndImplSymbolsIgnore
 * ExtendedIntfAndImplSymbolsOnly