< prev index next >

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

Print this page

        

@@ -564,11 +564,10 @@
      */
     public Annotation[] getDeclaredAnnotations()  {
         throw new AssertionError("All subclasses should override this method");
     }
 
-
     // Shared access checking logic.
 
     // For non-public members or members in package-private classes,
     // it is necessary to perform somewhat expensive security checks.
     // If the security check succeeds for a given class, it will

@@ -674,6 +673,15 @@
             }
             printStackPropertiesSet = true;
         }
         return printStackWhenAccessFails;
     }
+
+    /**
+     * Returns the root AccessibleObject; or null if this object is the root.
+     *
+     * All subclasses override this method.
+     */
+    AccessibleObject getRoot() {
+        throw new InternalError();
+    }
 }
< prev index next >