public class ContextClassLoaderUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <V> V |
doWithClassLoader(ClassLoader classLoader,
Callable<V> callable)
Executes a piece of code (callable.call) using a specific class loader set as context class loader.
|
public static <V> V doWithClassLoader(ClassLoader classLoader, Callable<V> callable) throws Exception
classLoader - clas loader to be used as context clas loader during call.callable - piece of code to be executed using the clas loaderException - re-thrown from callableCopyright © 2006–2015 OPS4J - Open Participation Software for Java. All rights reserved.