--- old/src/java.base/share/classes/java/lang/Class.java 2020-03-02 23:35:15.792513999 -0800 +++ new/src/java.base/share/classes/java/lang/Class.java 2020-03-02 23:35:15.508655999 -0800 @@ -3772,9 +3772,14 @@ } /** + * {@inheritDoc} + *
Note that any annotation returned by this method is a
+ * declaration annotation.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.5
*/
+ @Override
@SuppressWarnings("unchecked")
public A getAnnotation(Class annotationClass) {
Objects.requireNonNull(annotationClass);
@@ -3793,6 +3798,10 @@
}
/**
+ * {@inheritDoc}
+ * Note that any annotations returned by this method are
+ * declaration annotations.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.8
*/
@@ -3807,13 +3816,22 @@
}
/**
+ * {@inheritDoc}
+ * Note that any annotations returned by this method are
+ * declaration annotations.
+ *
* @since 1.5
*/
+ @Override
public Annotation[] getAnnotations() {
return AnnotationParser.toArray(annotationData().annotations);
}
/**
+ * {@inheritDoc}
+ * Note that any annotation returned by this method is a
+ * declaration annotation.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.8
*/
@@ -3826,6 +3844,10 @@
}
/**
+ * {@inheritDoc}
+ * Note that any annotations returned by this method are a
+ * declaration annotations.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.8
*/
@@ -3838,8 +3860,13 @@
}
/**
+ * {@inheritDoc}
+ * Note that any annotations returned by this method are
+ * declaration annotations.
+ *
* @since 1.5
*/
+ @Override
public Annotation[] getDeclaredAnnotations() {
return AnnotationParser.toArray(annotationData().declaredAnnotations);
}
--- old/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java 2020-03-02 23:35:16.284267999 -0800
+++ new/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java 2020-03-02 23:35:16.052383999 -0800
@@ -509,9 +509,14 @@
new ReflectionFactory.GetReflectionFactoryAction());
/**
+ * {@inheritDoc}
+ * Note that any annotation returned by this method is a
+ * declaration annotation.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.5
*/
+ @Override
public Note that any annotations returned by this method are
+ * declaration annotations.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.8
*/
@@ -536,13 +545,22 @@
}
/**
+ * {@inheritDoc}
+ * Note that any annotations returned by this method are
+ * declaration annotations.
+ *
* @since 1.5
*/
+ @Override
public Annotation[] getAnnotations() {
return getDeclaredAnnotations();
}
/**
+ * {@inheritDoc}
+ * Note that any annotation returned by this method is a
+ * declaration annotation.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.8
*/
@@ -555,6 +573,10 @@
}
/**
+ * {@inheritDoc}
+ * Note that any annotations returned by this method are a
+ * declaration annotations.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.8
*/
@@ -567,8 +589,13 @@
}
/**
+ * {@inheritDoc}
+ * Note that any annotations returned by this method are
+ * declaration annotations.
+ *
* @since 1.5
*/
+ @Override
public Annotation[] getDeclaredAnnotations() {
throw new AssertionError("All subclasses should override this method");
}
--- old/src/java.base/share/classes/java/lang/reflect/AnnotatedType.java 2020-03-02 23:35:16.744037999 -0800
+++ new/src/java.base/share/classes/java/lang/reflect/AnnotatedType.java 2020-03-02 23:35:16.508155999 -0800
@@ -25,6 +25,8 @@
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
@@ -72,4 +74,16 @@
* @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}
+ * @since 1.8
+ */
+ @Override
+ Note that any annotations returned by this method are
+ * declaration annotations.
+ *
* @see java.lang.reflect.Parameter
* @see java.lang.reflect.Parameter#getAnnotations
* @return an array of arrays that represent the annotations on
@@ -577,6 +580,7 @@
* {@inheritDoc}
* @throws NullPointerException {@inheritDoc}
*/
+ @Override
public