This method of the StandardSecurityManager Class determines whether classes within the current execution context, based on the call stack of the current thread, are allowed to use the reflection APIs to access members of the specified type from the specified class.
public void checkMemberAccess(Class clazz, int which);
clazz | The class to which access is being checked. |
which | The type of class members to which access is being checked. |
The check succeeds only if all the classes found on the call stack possess ReflectionPermissions, and if those permissions allow access to the specified class.
SecurityException if the security check fails.