Set the
accessible flag for this object to
the indicated boolean value. A value of
true indicates that
the reflected object should suppress Java language access
checking when it is used. A value of
false indicates
that the reflected object should enforce Java language access checks.
First, if there is a security manager, its
checkPermission
method is called with a
ReflectPermission("suppressAccessChecks")
permission.
A SecurityException
is raised if flag
is
true
but accessibility of this object may not be changed
(for example, if this element object is a Constructor
object for
the class Class
).
A SecurityException
is raised if this object is a Constructor
object for the class
java.lang.Class
, and flag
is true.
Parameters:
- flag - the new value for the accessible flag
Throws:
- SecurityException - if the request is denied.
See Also:
SecurityManager.checkPermission(java.security.Permission)
,
RuntimePermission
,