1 21 package oracle.toplink.essentials.internal.security; 23 24 import java.security.PrivilegedExceptionAction ; 25 26 public class PrivilegedGetDeclaredField implements PrivilegedExceptionAction { 27 28 private Class javaClass; 29 private String fieldName; 30 private boolean shouldSetAccessible; 31 32 public PrivilegedGetDeclaredField(Class javaClass, String fieldName, boolean shouldSetAccessible) { 33 this.javaClass = javaClass; 34 this.fieldName = fieldName; 35 this.shouldSetAccessible = shouldSetAccessible; 36 } 37 38 public Object run() throws NoSuchFieldException { 39 return PrivilegedAccessHelper.getDeclaredField(javaClass, fieldName, shouldSetAccessible); 40 } 41 42 } 43 | Popular Tags |