< prev index next >
src/java.base/share/classes/java/lang/reflect/AnnotatedType.java
Print this page
@@ -23,10 +23,12 @@
* 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,6 +72,52 @@
* Returns the underlying type that this annotated type represents.
*
* @return the type this annotated type represents
*/
public Type getType();
+
+ /**
+ * {@inheritDoc}
+ * <p>Any annotation returned by this method is a type annotation.
+ * @throws NullPointerException {@inheritDoc}
+ */
+ @Override
+ <T extends Annotation> T getAnnotation(Class<T> annotationClass);
+
+ /**
+ * {@inheritDoc}
+ * <p>Any annotations returned by this method are type annotations.
+ * @throws NullPointerException {@inheritDoc}
+ */
+ @Override
+ public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationClass);
+
+ /**
+ * {@inheritDoc}
+ * <p>Any annotations returned by this method are type annotations.
+ */
+ @Override
+ public Annotation[] getAnnotations();
+
+ /**
+ * {@inheritDoc}
+ * <p>Any annotation returned by this method is a type annotation.
+ * @throws NullPointerException {@inheritDoc}
+ */
+ @Override
+ public <A extends Annotation> A getDeclaredAnnotation(Class<A> annotationClass);
+
+ /**
+ * {@inheritDoc}
+ * <p>Any annotations returned by this method are type annotations.
+ * @throws NullPointerException {@inheritDoc}
+ */
+ @Override
+ public <A extends Annotation> A[] getDeclaredAnnotationsByType(Class<A> annotationClass);
+
+ /**
+ * {@inheritDoc}
+ * <p>Any annotations returned by this method are type annotations.
+ */
+ @Override
+ public Annotation[] getDeclaredAnnotations();
}
< prev index next >