Initial spec for Repeating Annotations and Method Parameter Reflection

Alex Buckley alex.buckley at oracle.com
Fri Aug 17 14:24:15 PDT 2012


Metadata fans,

Oracle engineers have been working on Repeating Annotations and Method 
Parameter Reflection for a number of months.

The design, specification, and implementation of Repeating Annotations 
is considerably advanced. We have a language specification and a 
detailed example-led description of how repeating annotations are 
compiled and how java.lang.reflect.AnnotatedElement can be improved.

Method Parameter Reflection (I use this title because the feature is 
more than just parameter names) is much less advanced. We have a 
ClassFile specification to record parameter information, but many 
questions about the recording of parameter names are yet to be asked, 
let alone answered.

I have consolidated all available material into a single, spec-licensed PDF:

   http://cr.openjdk.java.net/~abuckley/8misc.pdf

Please send substantive technical comments about the material to this list.

In the next few weeks, the implementation of Repeating Annotations 
should appear in the jdk8/tl forest, and we will start thinking about 
core reflection and language model (JSR 269) APIs for method parameters.

If you are wondering whether Repeating Annotations interact with Type 
Annotations, you are right. An annotation on a type use should be 
repeatable just like an annotation on a declaration. The JSR 308 team is 
aware of this and will raise it with the JSR 308 Expert Group soon, 
followed by R.I. work in the Type Annotations Project.

Alex



More information about the enhanced-metadata-spec-discuss mailing list