public class ClassLoaderPool extends Object
Constructor and Description |
---|
ClassLoaderPool() |
Modifier and Type | Method and Description |
---|---|
static ClassLoader |
getClassLoader(String contextName)
Returns the class loader associated with the context name.
|
static String |
getContextName(ClassLoader classLoader)
Returns the context name associated with the class loader.
|
static void |
register(String contextName,
ClassLoader classLoader) |
static void |
unregister(ClassLoader classLoader) |
static void |
unregister(String contextName) |
public static ClassLoader getClassLoader(String contextName)
If no class loader is found for the context name, the thread's context class loader is returned as a fallback.
contextName
- the servlet context's namepublic static String getContextName(ClassLoader classLoader)
If the class loader is null
or if no context name is
associated with the class loader, StringPool#
is returned.
NULL
classLoader
- the class loaderpublic static void register(String contextName, ClassLoader classLoader)
public static void unregister(ClassLoader classLoader)
public static void unregister(String contextName)