|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.jelly.util.ClassLoaderUtils
public class ClassLoaderUtils
A class to centralize the class loader management code.
Field Summary | |
---|---|
private static org.apache.commons.logging.Log |
log
log for debug etc output |
Constructor Summary | |
---|---|
ClassLoaderUtils()
|
Method Summary | |
---|---|
static java.lang.ClassLoader |
getClassLoader(java.lang.Class clazz)
Get the loader for the given class. |
static java.lang.ClassLoader |
getClassLoader(java.lang.ClassLoader specifiedLoader,
boolean useContextClassLoader,
java.lang.Class callingClass)
Return the class loader to be used for instantiating application objects when required. |
static java.lang.ClassLoader |
getClassLoader(java.lang.ClassLoader specifiedLoader,
java.lang.Class callingClass)
Return the class loader to be used for instantiating application objects when a context class loader is not specified. |
static java.lang.Class |
loadClass(java.lang.String className,
java.lang.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 java.lang.Class |
loadClass(java.lang.String className,
java.lang.ClassLoader specifiedLoader,
boolean useContextLoader,
java.lang.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 |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
Constructor Detail |
---|
public ClassLoaderUtils()
Method Detail |
---|
public static java.lang.ClassLoader getClassLoader(java.lang.ClassLoader specifiedLoader, boolean useContextClassLoader, java.lang.Class callingClass)
useContextClassLoader
is true
public static java.lang.ClassLoader getClassLoader(java.lang.ClassLoader specifiedLoader, java.lang.Class callingClass)
public static java.lang.ClassLoader getClassLoader(java.lang.Class clazz)
clazz
- the class to retrieve the loader for
public static java.lang.Class loadClass(java.lang.String className, java.lang.Class callingClass) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static java.lang.Class loadClass(java.lang.String className, java.lang.ClassLoader specifiedLoader, boolean useContextLoader, java.lang.Class callingClass) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |