Example of ReflectPermission in Java
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);