1 21 package oracle.toplink.essentials.internal.security; 23 24 import java.security.PrivilegedExceptionAction ; 25 26 27 public class PrivilegedGetMethod implements PrivilegedExceptionAction { 28 29 private Class clazz; 30 private String methodName; 31 private Class [] methodParameterTypes; 32 private boolean shouldSetAccessible; 33 34 public PrivilegedGetMethod(Class clazz, String methodName, Class [] methodParameterTypes, boolean shouldSetAccessible) { 35 this.clazz = clazz; 36 this.methodName = methodName; 37 this.methodParameterTypes = methodParameterTypes; 38 } 39 40 public Object run() throws NoSuchMethodException { 41 return PrivilegedAccessHelper.getMethod(clazz, methodName, methodParameterTypes, shouldSetAccessible); 42 } 43 44 } 45 46 | Popular Tags |