--- old/src/share/classes/javax/lang/model/AnnotatedConstruct.java 2013-05-20 22:33:56.000000000 -0700 +++ new/src/share/classes/javax/lang/model/AnnotatedConstruct.java 2013-05-20 22:33:56.000000000 -0700 @@ -39,35 +39,72 @@ * are on a declaration, whereas annotations on a type are on * a specific use of a type name. * - * The terms directly present and present are used + * The terms directly present, present, + * indirectly present, and associated are used * throughout this interface to describe precisely which annotations - * are returned by methods: + * are returned by the methods defined herein. * - *
An annotation A is directly present on a - * construct E if E is annotated, and: + *
In the definitions below, an annotation A has an + * annotation type AT. If AT is a repeatable annotation + * type, the type of the containing annotation is ATC. * + *
Annotation A is directly present on a construct + * C if either: + * + *
Typically, if exactly one annotation of type AT appears in + * the source code of representation of C, then A is + * explicitly declared as applying to C. + * + * If there are multiple annotations of type AT present on + * C, then if AT is repeatable annotation type, an + * annotation of type ATC is implicitly declared on C. + * + *
An annotation A is present on a + * construct C if either: *
An annotation A is present on a construct E if either: + * An annotation A is indirectly present on a construct + * C if both: * *
The annotation returned by this method could contain an element * whose value is of type {@code Class}. @@ -118,9 +154,8 @@ * @param the annotation type * @param annotationType the {@code Class} object corresponding to * the annotation type - * @return this element's or type use's annotation for the - * specified annotation type if present on this element, else - * {@code null} + * @return this construct's annotation for the specified + * annotation type if present, else {@code null} * * @see #getAnnotationMirrors() * @see java.lang.reflect.AnnotatedElement#getAnnotation @@ -134,10 +169,10 @@ A getAnnotation(Class annotationType); /** - * Returns annotations that are present on this construct. + * Returns annotations that are associated with this construct. * - * If there are no annotations present on this construct, - * the return value is an array of length 0. + * If there are no annotations associated with this construct, the + * return value is an array of length 0. * * The difference between this method and {@link #getAnnotation(Class)} * is that this method detects if its argument is a repeatable @@ -172,8 +207,8 @@ * @param the annotation type * @param annotationType the {@code Class} object corresponding to * the annotation type - * @return this element's annotations for the specified annotation - * type if present on this element, else an empty array + * @return this construct's annotations for the specified annotation + * type if present on this construct, else an empty array * * @see #getAnnotationMirrors() * @see #getAnnotation(java.lang.Class)