|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.jelly.util.ClassLoaderUtils
public class ClassLoaderUtils
A class to centralize the class loader management code.
| Constructor Summary | |
|---|---|
ClassLoaderUtils()
|
|
| Method Summary | |
|---|---|
static ClassLoader |
getClassLoader(Class clazz)
Get the loader for the given class. |
static ClassLoader |
getClassLoader(ClassLoader specifiedLoader,
boolean useContextClassLoader,
Class callingClass)
Return the class loader to be used for instantiating application objects when required. |
static ClassLoader |
getClassLoader(ClassLoader specifiedLoader,
Class callingClass)
Return the class loader to be used for instantiating application objects when a context class loader is not specified. |
static Class |
loadClass(String className,
Class callingClass)
Loads the given class using the current Thread's context class loader first otherwise use the class loader which loaded this class. |
static Class |
loadClass(String className,
ClassLoader specifiedLoader,
boolean useContextLoader,
Class callingClass)
Loads the given class using: the specified classloader, the current Thread's context class loader first, if asked otherwise use the class loader which loaded this class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassLoaderUtils()
| Method Detail |
|---|
public static ClassLoader getClassLoader(ClassLoader specifiedLoader,
boolean useContextClassLoader,
Class callingClass)
useContextClassLoader is true
public static ClassLoader getClassLoader(ClassLoader specifiedLoader,
Class callingClass)
public static ClassLoader getClassLoader(Class clazz)
clazz - the class to retrieve the loader for
public static Class loadClass(String className,
Class callingClass)
throws ClassNotFoundException
ClassNotFoundException
public static Class loadClass(String className,
ClassLoader specifiedLoader,
boolean useContextLoader,
Class callingClass)
throws ClassNotFoundException
ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||