Class Overview
Utility to run Runnable implementations in a different ClassLoader.
Summary
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
ContextClassLoaderSwitchingUtil
()
Public Methods
public
static
void
runInContext
(ClassLoader newClassLoader, Runnable runnable)
Executes the provided Runnable implementation in the specified ClassLoader.
Utilises the
push(ClassLoader) method to save the old
ClassLoader and
set the one specified as
newClassLoader.
pop() is
called in a finally block to ensure the
ClassLoader is set back to the original one.
Parameters
| newClassLoader
| The ClassLoader to run the specified Runnable in. |
| runnable
| The implementation to be run in the specified ClassLoader
|