< prev index next >

src/java.base/share/classes/java/lang/reflect/AccessibleObject.java

Print this page

        

@@ -502,13 +502,16 @@
     static final ReflectionFactory reflectionFactory =
         AccessController.doPrivileged(
             new ReflectionFactory.GetReflectionFactoryAction());
 
     /**
+     * {@inheritDoc}
+     * <p>Any annotation returned by this method is a declaration annotation.
      * @throws NullPointerException {@inheritDoc}
      * @since 1.5
      */
+    @Override
     public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
         throw new AssertionError("All subclasses should override this method");
     }
 
     /**

@@ -520,26 +523,33 @@
     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 <T extends Annotation> T[] getAnnotationsByType(Class<T> annotationClass) {
         throw new AssertionError("All subclasses should override this method");
     }
 
     /**
+     * {@inheritDoc}
+     * <p>Any annotations returned by this method are declaration annotations.
      * @since 1.5
      */
+    @Override
     public Annotation[] getAnnotations() {
         return getDeclaredAnnotations();
     }
 
     /**
+     * {@inheritDoc}
+     * <p>Any annotation returned by this method is a declaration annotation.
      * @throws NullPointerException {@inheritDoc}
      * @since 1.8
      */
     @Override
     public <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass) {

@@ -548,10 +558,12 @@
         // getAnnotation.
         return getAnnotation(annotationClass);
     }
 
     /**
+     * {@inheritDoc}
+     * <p>Any annotations returned by this method are declaration annotations.
      * @throws NullPointerException {@inheritDoc}
      * @since 1.8
      */
     @Override
     public <T extends Annotation> T[] getDeclaredAnnotationsByType(Class<T> annotationClass) {

@@ -560,12 +572,15 @@
         // getAnnotationsByType.
         return getAnnotationsByType(annotationClass);
     }
 
     /**
+     * {@inheritDoc}
+     * <p>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");
     }
 
     // Shared access checking logic.
< prev index next >