1 21 package oracle.toplink.essentials.internal.security; 23 24 import java.security.PrivilegedExceptionAction ; 25 import java.lang.reflect.Method ; 26 import java.lang.reflect.InvocationTargetException ; 27 28 29 public class PrivilegedMethodInvoker implements PrivilegedExceptionAction { 30 31 private Method method; 32 private Object target; 33 private Object [] args; 34 35 public PrivilegedMethodInvoker(Method method, Object target, Object [] args){ 36 this.method = method; 37 this.target = target; 38 this.args = args; 39 } 40 41 public Object run() throws IllegalAccessException , InvocationTargetException { 42 return PrivilegedAccessHelper.invokeMethod(method, target, args); 43 } 44 45 } 46 | Popular Tags |