src/share/classes/java/lang/Class.java

Print this page

        

@@ -23,10 +23,11 @@
  * questions.
  */
 
 package java.lang;
 
+import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Array;
 import java.lang.reflect.GenericArrayType;
 import java.lang.reflect.Member;
 import java.lang.reflect.Field;
 import java.lang.reflect.Executable;

@@ -3082,10 +3083,20 @@
         initAnnotationsIfNecessary();
         return (A) annotations.get(annotationClass);
     }
 
     /**
+     * {@inheritDoc}
+     * @throws NullPointerException {@inheritDoc}
+     * @since 1.5
+     */
+    @Override
+    public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
+        return AnnotatedElement.super.isAnnotationPresent(annotationClass);
+    }
+
+    /**
      * @throws NullPointerException {@inheritDoc}
      * @since 1.8
      */
     @Override
     public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationClass) {