Status of retrieving annotations on type parameters?
joe.darcy at oracle.com
Tue Mar 26 14:10:14 PDT 2013
On 03/26/2013 01:18 PM, Alex Buckley wrote:
> 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  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  are still
> applicable even with the placement of annotations directly on
> Element's and TypeMirror's . I don't see changes to
> getTypeParameters() in the langtools changeset linked from JDK-8007803.
When using the tip of TL with some local changes, the behavior I'm
seeing is that declaration annotations on type parameters are *not*
being retrieved from the AnnotedConstruct methods when called on a
TypeParameterElement. I wanted to double check if this was the expected
behavior right now or if I should continue to look for operator error on
my part. (I see there are some langtools tests which reference
TYPE_PARAMETER, but I haven't traced through what they test.)
More information about the type-annotations-dev