src/share/classes/java/lang/reflect/AnnotatedElement.java

Print this page

        

*** 128,137 **** --- 128,138 ---- /** * Returns this element's annotation for the specified type if * such an annotation is present, else null. * + * @param <T> the type of the annotation to query for and return if present * @param annotationClass the Class object corresponding to the * annotation type * @return this element's annotation for the specified annotation type if * present on this element, else null * @throws NullPointerException if the given annotation class is null
*** 152,161 **** --- 153,163 ---- * annotation. * * The caller of this method is free to modify the returned array; it will * have no effect on the arrays returned to other callers. * + * @param <T> the type of the annotation to query for and return if present * @param annotationClass the Class object corresponding to the * annotation type * @return all this element's annotations for the specified annotation type if * present on this element, else an array of length zero * @throws NullPointerException if the given annotation class is null
*** 182,191 **** --- 184,194 ---- * such an annotation is present, else null. * * This method ignores inherited annotations. (Returns null if no * annotations are directly present on this element.) * + * @param <T> the type of the annotation to query for and return if present * @param annotationClass the Class object corresponding to the * annotation type * @return this element's annotation for the specified annotation type if * present on this element, else null * @throws NullPointerException if the given annotation class is null
*** 207,216 **** --- 210,221 ---- * through" a container annotation. * * The caller of this method is free to modify the returned array; it will * have no effect on the arrays returned to other callers. * + * @param <T> the type of the annotation to query for and return + * if directly present * @param annotationClass the Class object corresponding to the * annotation type * @return all this element's annotations for the specified annotation type if * present on this element, else an array of length zero * @throws NullPointerException if the given annotation class is null