1 21 package oracle.toplink.essentials.internal.security; 23 24 import java.security.PrivilegedExceptionAction ; 25 26 public class PrivilegedClassForName implements PrivilegedExceptionAction { 27 28 private String className; 29 private boolean initialize; 30 private ClassLoader loader; 31 32 public PrivilegedClassForName(String className, boolean initialize, ClassLoader loader){ 33 this.className = className; 34 this.initialize = initialize; 35 this.loader = loader; 36 } 37 38 public PrivilegedClassForName(String className){ 39 this.className = className; 40 } 41 42 public Object run() throws ClassNotFoundException { 43 if (loader == null){ 44 return PrivilegedAccessHelper.getClassForName(className); 45 } else { 46 return PrivilegedAccessHelper.getClassForName(className, initialize, loader); 47 } 48 } 49 50 51 } | Popular Tags |