Spec updates for getAnnotationsByType and implicit declarations (original) (raw)
Alex Buckley alex.buckley at oracle.com
Thu Jan 31 18:29:09 PST 2013
- Previous message: Suggestion for additional discussion of annotation evolution vis a vis repeatability in JLS 13.5.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
For repeating annotations, I adopted get[Declared]AnnotationsByType(Class) in the reflection APIs, and clarified the definitions of "directly present" and "present".
For parameter reflection, I did the groundwork for "implicitly declared" constructs in the JLS, and clarified that a compiler is to mark constructs based on whether they are explicitly or implicitly declared. A compiler which emits class files can conform by utilizing the ACC_SYNTHETIC and ACC_MANDATED flags described in JVMS 4.7.22. These flags defer to a language specification for their full meaning. (It is generally better for the JVMS to provide a space which meets the requirements of what a compiler would need to represent a language construct, than the JLS saving exactly how to map a language construct into a class file. Example: the Signature attribute, JVMS 4.7.9.)
The spec is at http://cr.openjdk.java.net/~abuckley/8misc.pdf as usual.
Alex
P.S. There was minor discussion on the GPL'd compiler-dev list about naming the ACC_MANDATED flag, starting at http://mail.openjdk.java.net/pipermail/compiler-dev/2013-January/005450.html
- Previous message: Suggestion for additional discussion of annotation evolution vis a vis repeatability in JLS 13.5.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the enhanced-metadata-spec-discuss mailing list