< prev index next >
src/java.base/share/classes/java/lang/Package.java
Print this page
@@ -432,13 +432,18 @@
}
return packageInfo;
}
/**
+ * {@inheritDoc}
+ * <p>Note that any annotation returned by this method is a
+ * declaration annotation.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.5
*/
+ @Override
public <A extends Annotation> A getAnnotation(Class<A> annotationClass) {
return getPackageInfo().getAnnotation(annotationClass);
}
/**
@@ -450,26 +455,38 @@
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
return AnnotatedElement.super.isAnnotationPresent(annotationClass);
}
/**
+ * {@inheritDoc}
+ * <p>Note that any annotations returned by this method are
+ * declaration annotations.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.8
*/
@Override
public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationClass) {
return getPackageInfo().getAnnotationsByType(annotationClass);
}
/**
+ * {@inheritDoc}
+ * <p>Note that any annotations returned by this method are
+ * declaration annotations.
* @since 1.5
*/
+ @Override
public Annotation[] getAnnotations() {
return getPackageInfo().getAnnotations();
}
/**
+ * {@inheritDoc}
+ * <p>Note that any annotation returned by this method is a
+ * declaration annotation.
+ *
* @throws NullPointerException {@inheritDoc}
* @since 1.8
*/
@Override
public <A extends Annotation> A getDeclaredAnnotation(Class<A> annotationClass) {
@@ -484,12 +501,16 @@
public <A extends Annotation> A[] getDeclaredAnnotationsByType(Class<A> annotationClass) {
return getPackageInfo().getDeclaredAnnotationsByType(annotationClass);
}
/**
+ * {@inheritDoc}
+ * <p>Note that any annotations returned by this method are
+ * declaration annotations.
* @since 1.5
*/
+ @Override
public Annotation[] getDeclaredAnnotations() {
return getPackageInfo().getDeclaredAnnotations();
}
/**
< prev index next >