Package org.jboss.util.loading
Class ContextClassLoader
- java.lang.Object
-
- org.jboss.util.loading.ContextClassLoader
-
- Direct Known Subclasses:
ContextClassLoaderSwitcher
public class ContextClassLoader extends java.lang.Object
A helper for context classloading.When a security manager is installed, the constructor checks for the runtime permissions "getClassLoader"
- Version:
- $Revision$
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ContextClassLoader.NewInstance
-
Field Summary
Fields Modifier and Type Field Description static java.lang.RuntimePermission
GETCLASSLOADER
Retrieve a classloader permissionstatic ContextClassLoader.NewInstance
INSTANTIATOR
Instantiate a new context class loader
-
Constructor Summary
Constructors Constructor Description ContextClassLoader()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ClassLoader
getContextClassLoader()
Retrieve the context classloaderjava.lang.ClassLoader
getContextClassLoader(java.lang.Thread thread)
Retrieve the context classloader for the given thread
-
-
-
Field Detail
-
GETCLASSLOADER
public static final java.lang.RuntimePermission GETCLASSLOADER
Retrieve a classloader permission
-
INSTANTIATOR
public static final ContextClassLoader.NewInstance INSTANTIATOR
Instantiate a new context class loader
-
-
Method Detail
-
getContextClassLoader
public java.lang.ClassLoader getContextClassLoader()
Retrieve the context classloader- Returns:
- the context classloader
-
getContextClassLoader
public java.lang.ClassLoader getContextClassLoader(java.lang.Thread thread)
Retrieve the context classloader for the given thread- Parameters:
thread
- the thread- Returns:
- the context classloader
-
-