Status of retrieving annotations on type parameters?

Alex Buckley alex.buckley at oracle.com
Tue Mar 26 13:18:10 PDT 2013


On 3/26/2013 10:26 AM, Joe Darcy wrote:
> Related to updating the annotation processing specification to account
> for JSR 308, I wanted to quickly double-check on the implementation
> status of retrieving declaration annotations on type parameters.
>
> Is this functionally currently supported in either the javax.lang.model
> API or in core reflection?

The JBS bugs for type annotations reflection are:

   JDK-8004698 Implement Core Reflection for Type Annotations
   JDK-8007803 Implement javax.lang.model API for Type Annotations

For core reflection, the actions called for in [1] have been 
implemented. j.l.r.TypeVariable has a new method getAnnotatedBounds(), 
and the implementation of TypeVariable implements AnnotatedElement fully.

For the language model, the actions called for in [1] are still 
applicable even with the placement of annotations directly on Element's 
and TypeMirror's [2]. I don't see changes to getTypeParameters() in the 
langtools changeset linked from JDK-8007803.

Alex

[1] 
http://mail.openjdk.java.net/pipermail/type-annotations-spec-experts/2012-September/000001.html 


[2] 
http://mail.openjdk.java.net/pipermail/type-annotations-spec-experts/2013-February/000064.html


More information about the type-annotations-dev mailing list