< prev index next >
src/java.base/share/classes/java/lang/reflect/AnnotatedType.java
Print this page
*** 23,32 ****
--- 23,34 ----
* questions.
*/
package java.lang.reflect;
+ import java.lang.annotation.Annotation;
+
/**
* {@code AnnotatedType} represents the potentially annotated use of a type in
* the program currently running in this VM. The use may be of any type in the
* Java programming language, including an array type, a parameterized type, a
* type variable, or a wildcard type.
*** 70,75 ****
--- 72,89 ----
* Returns the underlying type that this annotated type represents.
*
* @return the type this annotated type represents
*/
public Type getType();
+
+ /**
+ * {@inheritDoc}
+ * <p>Note that any annotation returned by this method is a type
+ * annotation.
+ *
+ * @throws NullPointerException {@inheritDoc}
+ * @since 1.8
+ */
+ @Override
+ <T extends Annotation> T getAnnotation(Class<T> annotationClass);
+
}
< prev index next >