java.lang.Object | +--java.lang.reflect.AccessibleObject
AccessibleObject() Only the three reflection classes that extend this can create an accessible object. |
boolean | isAccessible() Return the accessibility status of this object. |
static void | setAccessible(java.lang.reflect.AccessibleObject array, boolean flag) Convenience method to set the flag on a number of objects with a single security check. |
void | setAccessible(boolean flag) Sets the accessibility flag for this reflection object. |
protected AccessibleObject()
public boolean isAccessible()
public void setAccessible(boolean flag)
ReflectPermission("suppressAccessChecks")
.
If flag
is true, and the initial security check succeeds,
this will still fail for a forbidden object. At the moment, the
forbidden members are:
flag
- the desired state of accessibility, true to bypass securityNullPointerException
- if array is nullSecurityException
- if the request is deniedpublic static void setAccessible(java.lang.reflect.AccessibleObject array, boolean flag)
ReflectPermission("suppressAccessChecks")
.
If flag
is true, and the initial security check succeeds,
this can still fail if a forbidden object is encountered, leaving the
array half-modified. At the moment, the forbidden members are:
array
- the array of accessible objectsflag
- the desired state of accessibility, true to bypass securityNullPointerException
- if array is nullSecurityException
- if the request is denied