org.jboss.util.loading
Class ContextClassLoader

java.lang.Object
  extended byorg.jboss.util.loading.ContextClassLoader
Direct Known Subclasses:
ContextClassLoaderSwitcher (src)

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"


Field Summary
static java.lang.RuntimePermission GETCLASSLOADER
          Retrieve a classloader permission
static org.jboss.util.loading.ContextClassLoader.NewInstance INSTANTIATOR
          Instantiate a new context class loader
 
Method Summary
 java.lang.ClassLoader getContextClassLoader()
          Retrieve the context classloader
 java.lang.ClassLoader getContextClassLoader(java.lang.Thread thread)
          Retrieve the context classloader for the given thread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GETCLASSLOADER

public static final java.lang.RuntimePermission GETCLASSLOADER
Retrieve a classloader permission


INSTANTIATOR

public static final org.jboss.util.loading.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