public class ContextClassLoader
extends java.lang.Object
When a security manager is installed, the constructor checks for the runtime permissions "getClassLoader"
| Modifier and Type | Class and Description |
|---|---|
private static class |
ContextClassLoader.NewInstance |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.RuntimePermission |
GETCLASSLOADER
Retrieve a classloader permission
|
static ContextClassLoader.NewInstance |
INSTANTIATOR
Instantiate a new context class loader
|
| Constructor and Description |
|---|
ContextClassLoader()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.ClassLoader |
getContextClassLoader()
Retrieve the context classloader
|
java.lang.ClassLoader |
getContextClassLoader(java.lang.Thread thread)
Retrieve the context classloader for the given thread
|
public static final java.lang.RuntimePermission GETCLASSLOADER
public static final ContextClassLoader.NewInstance INSTANTIATOR
ContextClassLoader()
java.lang.SecurityException - when not authroized to get the context classloaderpublic java.lang.ClassLoader getContextClassLoader()
public java.lang.ClassLoader getContextClassLoader(java.lang.Thread thread)
thread - the thread