--- old/src/java.base/share/classes/java/lang/Class.java 2020-04-06 16:20:03.555005001 -0700 +++ new/src/java.base/share/classes/java/lang/Class.java 2020-04-06 16:20:03.291005001 -0700 @@ -3779,9 +3779,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);
@@ -3800,6 +3805,10 @@
}
/**
+ * {@inheritDoc}
+ * Note that any annotations returned by this method are
+ * declaration annotations.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.8
*/
@@ -3814,13 +3823,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
*/
@@ -3833,6 +3851,10 @@
}
/**
+ * {@inheritDoc}
+ * Note that any annotations returned by this method are
+ * declaration annotations.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.8
*/
@@ -3845,8 +3867,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);
}