RFR: JDK-8057804: AnnotatedType interfaces provide no way to get annotations on owner type

Joel Borggrén-Franck joel.borggren.franck at gmail.com
Tue Nov 17 19:15:25 UTC 2015


Hi,

When reflecting over annotated types, there is currently no way to get
the potentially annotated owner of a type. For example, given you have
an instance of '@A Outer . @B Inner' you can't traverse it to get '@A
Outer' .

This API addition fixes this. Because both parameterized and
non-generic types can have an owner, this addition goes into the base
AnnotatedType interface together with a default implementation. CCC
has been filed.

The parsing code and annotated type factory had to be fixed to deal
with navigating inside nested types.

Bug:       https://bugs.openjdk.java.net/browse/JDK-8057804
Webrev: http://cr.openjdk.java.net/~rbackman/jbf/8057804/webrev.00/


(OCA is signed and processed).

Cheers
/Joel



More information about the core-libs-dev mailing list