Name

ReflectPermission

Synopsis

This class is a java.security.Permission that governs access to private, protected, and default-visibility methods, constructors, and fields through the Java Reflection API. In Java 1.2, the only defined name, or target, for ReflectPermission is “suppressAccessChecks”. This permission is required to call the setAccessible( ) method of AccessibleObject. Unlike some Permission subclasses, ReflectPermission does not use a list of actions. See also AccessibleObject.

System administrators configuring security policies should be familiar with this class, but application programmers should never need to use it directly.

java.lang.reflect.ReflectPermission

Figure 10-101. java.lang.reflect.ReflectPermission

public final class ReflectPermission extends java.security.BasicPermission {
// Public Constructors
     public ReflectPermission(String name);  
     public ReflectPermission(String name, String actions);  
}

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.