Methods Summary |
---|
protected java.lang.Class | findClass(java.lang.String name)
// First check if we have permission to access the package.
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
int i = name.lastIndexOf('.");
if (i != -1) {
sm.checkPackageDefinition(name.substring(0, i));
}
}
return super.findClass(name);
|
protected java.security.PermissionCollection | getPermissions(java.security.CodeSource codesource)
// Use all the standard permissions, plus allow the code to
// exit the VM.
PermissionCollection pc = super.getPermissions(codesource);
pc.add(new RuntimePermission("exitVM"));
return pc;
|
public final synchronized java.lang.Class | loadClass(java.lang.String name, boolean resolve)
// First check if we have permission to access the package.
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
int i = name.lastIndexOf('.");
if (i != -1) {
sm.checkPackageAccess(name.substring(0, i));
}
}
return super.loadClass(name, resolve);
|