javadoc: not finding sym.type set

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Jan 28 18:20:29 PST 2013


Werner,

I've hooked my fancy new debugging printer into javadoc, to analyse how 
javadoc is processing a simple test program ...

public class Test {
     public @DAnno @TAnno int field;
}

The output shows that the symbol for "int field;" appears to be 
correctly annotated, but the "sym.type" field is not.  I would expect 
the type to be an AnnotatedType, with annos set to "@TAnno" and an 
underlying type of "int".  Here is the debug output.

Generating play/api/p/Test.html...
FieldDocImpl sym : 0x4--VAR FIELD field
   flags: 0x1--public
   completer: #null
   owner: p.Test
   type: int
   erasure: #null
   pos: 198
   adm: -1
   data: #null
   annotations:
     attributes: [1]
       0: Compound
         synthesized: false
         values: [0]
         type: q.DAnno
     type_attributes: [1]
       0: TypeCompound
         position: [FIELD, pos = 198]
         synthesized: false
         values: [0]
         type: q.TAnno
FieldDocImpl sym.type : INT
   tsym: int
   constValue: #null

I'm hoping the output is reasonably self-explanatory.  "FieldDocImpl" is 
the name of the javadoc class initiating the debug print.

So, am I right in expecting the type to be "@TAnno int"?  Do you have 
any idea why it might not be so?

-- Jon


More information about the type-annotations-dev mailing list