<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1443</bug_id>
          
          <creation_ts>2023-08-07 22:49:46 +0200</creation_ts>
          <short_desc>GlueGen: Parse Java annotations in source files</short_desc>
          <delta_ts>2023-08-07 23:29:59 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Gluegen</product>
          <component>core</component>
          <version>2.5.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>1435</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Mathieu Féry (MathiusD)">mfery</assigned_to>
          <cc>mfery</cc>
          
          <cf_type>FEATURE</cf_type>
          <cf_scm_refs>2abb40b0ca9a6a06bdbe3e66b4235301ed15c693</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6823</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2023-08-07 22:49:46 +0200</bug_when>
    <thetext>Java annotations shall be supported 
when parsing Java source files in GlueGen.

Java annotations, see https://en.wikipedia.org/wiki/Java_annotation</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6824</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2023-08-07 22:52:11 +0200</bug_when>
    <thetext>Mathieu Féry added this features in commit 2abb40b0ca9a6a06bdbe3e66b4235301ed15c693.

* Add basic management of annotations (with or w/o parameter(s)) (Retrieved in statement, classes and interfaces but not used)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6826</commentid>
    <comment_count>2</comment_count>
    <who name="Mathieu Féry (MathiusD)">mfery</who>
    <bug_when>2023-08-07 23:13:09 +0200</bug_when>
    <thetext></thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6828</commentid>
    <comment_count>3</comment_count>
    <who name="Mathieu Féry (MathiusD)">mfery</who>
    <bug_when>2023-08-07 23:29:59 +0200</bug_when>
    <thetext>Annotation management was made necessary by the Java Callback generation (Bug 1435) functionality. However, as the grammar was originally designed to parse java files compatible with JLS 1.3, annotations wasn&apos;t supported.

So by following the JLS below: https://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html#jls-9.7.4 since GlueGen requires a JVM 8 or higher, annotations have been added to the following positions (and in each case before and after modifiers):
 * Class declaration
 * Interface declaration
 * Field
 * Method
 * Parameters

Additional notes :
Java Callback need this modification because generate some inner interfaces and classes implements other with @Override annotation.

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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>