java.lang.ObjectA helper for context classloading switching.org.jboss.util.loading.ContextClassLoader
org.jboss.util.loading.ContextClassLoaderSwitcher
When a security manager is installed, the constructor checks for the runtime permissions "getClassLoader" and "setContextClassLoader". This allows the methods of this class to be used later without having to run in privileged blocks. There are optimized methods to perform the operations within a switch context. This avoids retrieving the current thread on every operation.
< - tt>$Revision: 1.4 $< - a href="mailto:adrian@jboss.org">Adrian Brock| Nested Class Summary: | ||
|---|---|---|
| public class | ContextClassLoaderSwitcher.SwitchContext | A helper class to remember the original classloader and avoid continually retrieveing the current thread. |
| Field Summary | ||
|---|---|---|
| public static final RuntimePermission | SETCONTEXTCLASSLOADER | Set the context classloader permission |
| public static final ContextClassLoaderSwitcher.NewInstance | INSTANTIATOR | Instantiate a new context class loader switcher |
| Fields inherited from org.jboss.util.loading.ContextClassLoader: |
|---|
| GETCLASSLOADER, INSTANTIATOR |
| Method from org.jboss.util.loading.ContextClassLoaderSwitcher Summary: |
|---|
| getSwitchContext, getSwitchContext, getSwitchContext, setContextClassLoader, setContextClassLoader |
| Methods from org.jboss.util.loading.ContextClassLoader: |
|---|
| getContextClassLoader, getContextClassLoader |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.jboss.util.loading.ContextClassLoaderSwitcher Detail: |
|---|
|
|
Deprecated! using - a class to determine the classloader is a
bad idea, it has the same problems as Class.forName()
|
|
|