Home  >  Core Java

Example of ReflectPermission in Java

By Arvind Rai, January 20, 2013
1. ReflectPermission class belongs to the package java.lang.reflect.
2. ReflectPermission extends BasePermission class.
3. It has only one named defined i.e suppressAccessChecks
4. suppressAccessChecks allows the suppressing the public, default, protected and private access of the class.
5. suppressAccessChecks has the risk that it may make available confidential information to malicious code.
Constructors.
1. ReflectPermission(String name)
2. ReflectPermission(String name, String actions)

ReflectPermission refperm = new ReflectPermission("suppressAccessChecks", "");
AccessController.checkPermission(refperm);
 
POSTED BY
ARVIND RAI
ARVIND RAI
FIND MORE TUTORILAS






©2019 concretepage.com | Privacy Policy | Contact Us