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

Print this page

        

@@ -128,10 +128,11 @@
 
    /**
      * 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,10 +153,11 @@
      * 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,10 +184,11 @@
      * 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,10 +210,12 @@
      * 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