< prev index next >

src/java.base/share/classes/java/lang/Package.java

Print this page

        

@@ -432,13 +432,16 @@
         }
         return packageInfo;
     }
 
     /**
+     * {@inheritDoc}
+     * <p>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,46 +453,58 @@
     public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
         return AnnotatedElement.super.isAnnotationPresent(annotationClass);
     }
 
     /**
+     * {@inheritDoc}
+     * <p>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>Any annotations returned by this method are declaration annotations.
      * @since 1.5
      */
+    @Override
     public Annotation[] getAnnotations() {
         return getPackageInfo().getAnnotations();
     }
 
     /**
+     * {@inheritDoc}
+     * <p>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) {
         return getPackageInfo().getDeclaredAnnotation(annotationClass);
     }
 
     /**
+     * {@inheritDoc}
+     * <p>Any annotations returned by this method are declaration annotations.
      * @throws NullPointerException {@inheritDoc}
      * @since 1.8
      */
     @Override
     public <A extends Annotation> A[] getDeclaredAnnotationsByType(Class<A> annotationClass) {
         return getPackageInfo().getDeclaredAnnotationsByType(annotationClass);
     }
 
     /**
+     * {@inheritDoc}
+     * <p>Any annotations returned by this method are declaration annotations.
      * @since 1.5
      */
+    @Override
     public Annotation[] getDeclaredAnnotations()  {
         return getPackageInfo().getDeclaredAnnotations();
     }
 
     /**
< prev index next >