|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cactus.util.ClassLoaderUtils
Utiliy methods related to class loading in a webapp environment.
Constructor Summary | |
ClassLoaderUtils()
|
Method Summary | |
static java.lang.Class |
loadClass(java.lang.String theClassName,
java.lang.Class theReferrer)
Try loading a class first by using the context class loader or by using the classloader of the referrer class if the context classloader failed to load the class. |
static java.lang.Class |
loadClassFromContextClassLoader(java.lang.String theClassName)
Try loading class using the Context class loader. |
static java.lang.Class |
loadClassFromWebappClassLoader(java.lang.String theClassName,
java.lang.Class theReferrer)
Try loading class using the Webapp class loader. |
static java.util.ResourceBundle |
loadPropertyResourceBundle(java.lang.String theName,
java.lang.Class theReferrer)
Try loading a resource bundle from either the context class loader or the |
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 java.lang.Class loadClass(java.lang.String theClassName, java.lang.Class theReferrer) throws java.lang.ClassNotFoundException
theClassName
- the name of the test classtheReferrer
- the class will be loaded using the classloader which
has loaded this referrer class
java.lang.ClassNotFoundException
- if the class cannot be loaded through
either classloaderpublic static java.lang.Class loadClassFromContextClassLoader(java.lang.String theClassName) throws java.lang.ClassNotFoundException
theClassName
- the class to load
Class
object for the class to load
java.lang.ClassNotFoundException
- if the class cannot be loaded through
this class loaderpublic static java.lang.Class loadClassFromWebappClassLoader(java.lang.String theClassName, java.lang.Class theReferrer) throws java.lang.ClassNotFoundException
theClassName
- the class to loadtheReferrer
- the class will be loaded using the classloader which
has loaded this referrer class
Class
object for the class to load
java.lang.ClassNotFoundException
- if the class cannot be loaded through
this class loaderpublic static java.util.ResourceBundle loadPropertyResourceBundle(java.lang.String theName, java.lang.Class theReferrer)
theName
- the resource bundle nametheReferrer
- the resource bundle will be loaded using the
classloader which has loaded this referrer class
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |