Please review the change to access the annotations from module-info
mandy.chung at oracle.com
Tue Apr 27 23:19:49 PDT 2010
Thanks for the feedback to the ModuleInfo API. This change also
implements the reflection methods to access the annotations in the
java.lang.reflect.Module class (i.e. implementation of AnnotatedElement
The webrev is at:
Most of the work is done in the java.lang.module.ModuleInfoAnnotation
class that does the following:
- parses a raw annotation from the module-info.class
- stores the element value pairs
- creates an Annotation object using the core reflection
- it supports for both ModuleInfo and Module API to access annotations.
The Annotation objects created for the ModuleInfo.getAnnotation() method
doesn't support elements of Class type.
I added a constructor of CoreReflectionFactory to take a Module
parameter so that its module class loader will be used to load classes
when instantiating an Annotation object. Is there any issue with
that? The factory will only be used to parse class signatures.
More information about the jigsaw-dev