-
Bug
-
Resolution: Fixed
-
P3
-
12
-
b19
-
Not verified
Look at the following text in https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/AnnotatedElement.html
An annotation A is directly present on an element E if E has a RuntimeVisibleAnnotations or RuntimeVisibleParameterAnnotations or RuntimeVisibleTypeAnnotations attribute, and the attribute contains A.
An annotation A is indirectly present on an element E if E has a RuntimeVisibleAnnotations or RuntimeVisibleParameterAnnotations or RuntimeVisibleTypeAnnotations attribute, and A 's type is repeatable, and the attribute contains exactly one annotation whose value element contains A and whose type is the containing annotation type of A 's type.
An annotation A is present on an element E if either:
A is directly present on E; or
No annotation of A 's type is directly present on E, and E is a class, and A 's type is inheritable, and A is present on the superclass of E.
An annotation A is associated with an element E if either:
A is directly or indirectly present on E; or
No annotation of A 's type is directly or indirectly present on E, and E is a class, and A's type is inheritable, and A is associated with the superclass of E.
In context, the word "present" in the 3rd bullet should be emphasized, because it is the defining instance of the term.
An annotation A is directly present on an element E if E has a RuntimeVisibleAnnotations or RuntimeVisibleParameterAnnotations or RuntimeVisibleTypeAnnotations attribute, and the attribute contains A.
An annotation A is indirectly present on an element E if E has a RuntimeVisibleAnnotations or RuntimeVisibleParameterAnnotations or RuntimeVisibleTypeAnnotations attribute, and A 's type is repeatable, and the attribute contains exactly one annotation whose value element contains A and whose type is the containing annotation type of A 's type.
An annotation A is present on an element E if either:
A is directly present on E; or
No annotation of A 's type is directly present on E, and E is a class, and A 's type is inheritable, and A is present on the superclass of E.
An annotation A is associated with an element E if either:
A is directly or indirectly present on E; or
No annotation of A 's type is directly or indirectly present on E, and E is a class, and A's type is inheritable, and A is associated with the superclass of E.
In context, the word "present" in the 3rd bullet should be emphasized, because it is the defining instance of the term.
- relates to
-
JDK-8010679 Clarify "present" and annotation ordering in Core Reflection for Annotations
- Closed
-
JDK-8010680 Clarify "present" and annotation ordering in javax.lang.model for Annotations
- Closed
-
JDK-8010364 Clarify javax.lang.model API for Type Annotations
- Closed