-
New Feature
-
Resolution: Unresolved
-
P4
-
None
The current design of jdk.vm.ci.meta.AnnotationData and jdk.vm.ci.meta.Annotated can be improved to have better naming and to support more use cases.
In terms of improving naming:
* AnnotationData -> AnnotationValue (avoids confusion with java.lang.Class.AnnotationData)
* The 2 versions of Annotated#getAnnotationData should be renamed to getAnnotationValue (for retrieving a single annotation value) and getAnnotationValues (for retrieving multiple annotation values).
The getAnnotationValues method above will have a single varargs value which, when it has a length of 0 will return all annotations declared on an element.
In terms of improving naming:
* AnnotationData -> AnnotationValue (avoids confusion with java.lang.Class.AnnotationData)
* The 2 versions of Annotated#getAnnotationData should be renamed to getAnnotationValue (for retrieving a single annotation value) and getAnnotationValues (for retrieving multiple annotation values).
The getAnnotationValues method above will have a single varargs value which, when it has a length of 0 will return all annotations declared on an element.