- 
    Type:
Task
 - 
    Resolution: Fixed
 - 
    Priority:
  P3                     
     - 
    Affects Version/s: 8
 - 
    Component/s: core-libs
 
- 
        b100
 - 
        Verified
 
1) In AnnotatedElement, the interface-level javadoc should have these definitions:
- 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 (§9.6).
- 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 (§9.6.3.3), 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 (§9.6.3.3), and A is associated with the superclass of E.
2) In AnnotatedElement#getDeclaredAnnotationsByType, the javadoc should be:
Returns the annotations which are directly or indirectly present on this element. The order of annotations which are directly or indirectly present on an element E is computed as if indirectly present annotations on E are directly present on E in place of their container annotation, in the order in which they appear in the value element of the container annotation.
@return: all this element's annotations for the specified annotation type if directly or indirectly present on this element, else an array of length zero.
3) In AnnotatedElement#getAnnotationsByType, the javadoc should be:
Returns the annotations which are associated with this element. The order of annotations which are directly or indirectly present on an element E is computed as if indirectly present annotations on E are directly present on E in place of their container annotation, in the order in which they appear in the value element of the container annotation.
@return: all this element's annotations for the specified annotation type if associated with this element, else an array of length zero.
4) In AnnotatedElement#getDeclaredAnnotation, the word "directly" is missing:
Returns this element's annotation for the specified type if such an annotation is directly present.
@return: this element's annotation for the specified annotation type if directly present on this element, else null.
- relates to
 - 
                    
JDK-7154390 Add support for repeating annotations in j.l.r.AnnotatedElement
-         
     - Closed
 
 -         
 - 
                    
JDK-8004698 Implement Core Reflection for Type Annotations
-         
     - Closed
 
 -         
 - 
                    
JDK-8010680 Clarify "present" and annotation ordering in javax.lang.model for Annotations
-         
     - Closed
 
 -         
 - 
                    
JDK-7151008 Add library support for repeating annotations in java.lang.annotation
-         
     - Closed
 
 -         
 - 
                    
JDK-8213444 Missing emphasis for term being defined
-         
     - Closed
 
 -         
 - 
                    
JDK-8010680 Clarify "present" and annotation ordering in javax.lang.model for Annotations
-         
     - Closed
 
 -         
 - 
                    
JDK-7162089 Add support for repeating annotations to javax.annotation.processing
-         
     - Closed
 
 -