type annotations in javadoc

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue Jan 22 21:30:37 PST 2013


Werner, Bhavesh,

I'm looking at the javadoc impl for type-annotations.   The following 
are simply notes/observations...

* See TypeMaker.getType which transforms javac "Type"s into javadoc ones.

* The TypeMaker.getType 67-69 sems to be redundant since it it 
effectively equivalent to the lines that follow

* The work to create text from annotations happens, or should happen in 
LinkFactory.getLinkOutput, round about line 64

* There's a presumption that type annotations precede the type, which is 
presumably not always true

* javadoc uses javadoc AnnotatedType to model javac AnnotatedType, 
providing methods to access the type annotations and underlying type.  
com.sun.javadoc.* is Yet Another Public Reflection API, along with 
javax.lang.model.* and java.lang.reflect.* and needs to be updated 
(officially).

* javadoc implicitly presumes that annotated types will be available 
when javadoc runs, after Enter/MemberEnter.  javadoc does not use Attr 
or anything later in the compiler pipeline.

-- Jon



More information about the type-annotations-dev mailing list