This method of the ReflectionPermission Class sets the types of classes that the permission object allows public reflective access to. The classes are specified by the loader types. For example, the following code indicates that the permission should allow reflective access to public members of all classes:
... ReflectionPermission perm = new ReflectionPermission(); perm.setAllowedPublicAccess(ReflectionPermission.ALL); ...
public void setAllowedPublicAccess(int loadertypes);
loadertypes | The types of classes that the permission object allows public reflective access to. This should be one of the following types: SAMELOADER, DIFFERENTLOADER, SYSTEMLOADER, ALL, or NONE. |