Bug 1442 - GlueGen: Parse inner classes & interfaces of Java source files
Summary: GlueGen: Parse inner classes & interfaces of Java source files
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: 2.5.0
Hardware: All all
: P4 normal
Assignee: Mathieu Féry (MathiusD)
Depends on:
Blocks: 1435
  Show dependency treegraph
Reported: 2023-08-07 13:38 CEST by Sven Gothel
Modified: 2023-08-07 23:35 CEST (History)
1 user (show)

See Also:
SCM Refs:
2abb40b0ca9a6a06bdbe3e66b4235301ed15c693 0e6d18c6b6d46b54e679ce0c44613e21e58245f2
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
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