Methods Summary |
---|
java.lang.ClassLoader | getContextClassLoader()
return (ClassLoader) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return Thread.currentThread().getContextClassLoader();
}
}
);
|
java.io.InputStream | getJavaHomeLibStream(java.lang.String filename)
return (InputStream) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
try {
String javahome = System.getProperty("java.home");
if (javahome == null) {
return null;
}
String pathname = javahome + java.io.File.separator +
"lib" + java.io.File.separator + filename;
return new java.io.FileInputStream(pathname);
} catch (Exception e) {
return null;
}
}
}
);
|
java.lang.String[] | getJndiProperties()
if (getSystemPropsFailed) {
return null; // after one failure, don't bother trying again
}
Properties sysProps = (Properties) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
try {
return System.getProperties();
} catch (SecurityException e) {
getSystemPropsFailed = true;
return null;
}
}
}
);
if (sysProps == null) {
return null;
}
String[] jProps = new String[PROPS.length];
for (int i = 0; i < PROPS.length; i++) {
jProps[i] = sysProps.getProperty(PROPS[i]);
}
return jProps;
|
java.lang.String | getJndiProperty(int i)
return (String) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
try {
return System.getProperty(PROPS[i]);
} catch (SecurityException e) {
return null;
}
}
}
);
|
java.io.InputStream | getResourceAsStream(java.lang.Class c, java.lang.String name)
return (InputStream) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return c.getResourceAsStream(name);
}
}
);
|
javax.naming.NamingEnumeration | getResources(java.lang.ClassLoader cl, java.lang.String name)
Enumeration urls;
try {
urls = (Enumeration) AccessController.doPrivileged(
new PrivilegedExceptionAction() {
public Object run() throws IOException {
return (cl == null)
? ClassLoader.getSystemResources(name)
: cl.getResources(name);
}
}
);
} catch (PrivilegedActionException e) {
throw (IOException)e.getException();
}
return new InputStreamEnumeration(urls);
|
public java.lang.Class | loadClass(java.lang.String className)
ClassLoader cl = getContextClassLoader();
return Class.forName(className, true, cl);
|
java.lang.Class | loadClass(java.lang.String className, java.lang.ClassLoader cl)Package private.
return Class.forName(className, true, cl);
|
public java.lang.Class | loadClass(java.lang.String className, java.lang.String codebase)
ClassLoader cl;
ClassLoader parent = getContextClassLoader();
cl = URLClassLoader.newInstance(getUrlArray(codebase), parent);
return Class.forName(className, true, cl);
|