--- old/src/java.base/share/classes/java/lang/reflect/AnnotatedType.java 2020-04-06 16:20:02.851005001 -0700 +++ new/src/java.base/share/classes/java/lang/reflect/AnnotatedType.java 2020-04-06 16:20:02.591005001 -0700 @@ -25,12 +25,18 @@ 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. * + * Note that any annotations returned by methods on this + * interface are type annotations (JLS {@jls 9.7.4}) as the + * entity being potentially annotated is a type. + * * @since 1.8 */ public interface AnnotatedType extends AnnotatedElement { @@ -72,4 +78,30 @@ * @return the type this annotated type represents */ public Type getType(); + + /** + * {@inheritDoc} + *
Note that any annotation returned by this method is a type
+ * annotation.
+ *
+ * @throws NullPointerException {@inheritDoc}
+ */
+ @Override
+ Note that any annotations returned by this method are type
+ * annotations.
+ */
+ @Override
+ Annotation[] getAnnotations();
+
+ /**
+ * {@inheritDoc}
+ * Note that any annotations returned by this method are type
+ * annotations.
+ */
+ @Override
+ Annotation[] getDeclaredAnnotations();
}