|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis.utils.ClassUtils
Utility methods for Class Loading.
Constructor Summary | |
ClassUtils()
|
Method Summary | |
static java.lang.ClassLoader |
createClassLoader(java.lang.String classpath,
java.lang.ClassLoader parent)
Creates a new ClassLoader from a classpath specification and a parent class loader. |
static java.lang.Class |
forName(java.lang.String className)
Use this method instead of Class.forName |
static java.lang.Class |
forName(java.lang.String _className,
boolean init,
java.lang.ClassLoader _loader)
Use this method instead of Class.forName (String className, boolean init, ClassLoader loader) |
static java.lang.ClassLoader |
getClassLoader(java.lang.String className)
Obtain the ClassLoader (if any) associated with the given className. |
static java.lang.ClassLoader |
getDefaultClassLoader()
|
static java.io.InputStream |
getResourceAsStream(java.lang.Class clazz,
java.lang.String resource)
Get an input stream from a named resource. |
static java.io.InputStream |
getResourceAsStream(java.lang.Class clazz,
java.lang.String resource,
boolean checkThreadContextFirst)
Get an input stream from a named resource. |
static java.lang.ClassLoader |
getThreadClassLoader()
|
static void |
removeClassLoader(java.lang.String className)
Deregister the ClassLoader for a given className. |
static void |
setClassLoader(java.lang.String className,
java.lang.ClassLoader loader)
Set the ClassLoader associated with the given className. |
static void |
setDefaultClassLoader(java.lang.ClassLoader loader)
Set the default ClassLoader. |
static void |
setThreadClassLoader(java.lang.ClassLoader cl)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassUtils()
Method Detail |
public static void setThreadClassLoader(java.lang.ClassLoader cl)
public static java.lang.ClassLoader getThreadClassLoader()
public static void setDefaultClassLoader(java.lang.ClassLoader loader)
loader
- the new default ClassLoaderpublic static java.lang.ClassLoader getDefaultClassLoader()
public static void setClassLoader(java.lang.String className, java.lang.ClassLoader loader)
className
- the name of a classloader
- the ClassLoader for the classpublic static java.lang.ClassLoader getClassLoader(java.lang.String className)
className
- the name of a class
public static void removeClassLoader(java.lang.String className)
className
- the name of a classpublic static java.lang.Class forName(java.lang.String className) throws java.lang.ClassNotFoundException
className
- Class name
java.lang.ClassNotFoundException
- if the class is not foundpublic static java.lang.Class forName(java.lang.String _className, boolean init, java.lang.ClassLoader _loader) throws java.lang.ClassNotFoundException
_className
- Class nameinit
- initialize the class_loader
- class loader
java.lang.ClassNotFoundException
- if the class is not foundpublic static java.io.InputStream getResourceAsStream(java.lang.Class clazz, java.lang.String resource, boolean checkThreadContextFirst)
clazz
- class to use in the lookupsresource
- resource string to look forcheckThreadContextFirst
- check the thread context first?
public static java.io.InputStream getResourceAsStream(java.lang.Class clazz, java.lang.String resource)
clazz
- class to use in the lookupsresource
- resource string to look for
public static java.lang.ClassLoader createClassLoader(java.lang.String classpath, java.lang.ClassLoader parent) throws java.lang.SecurityException
classpath
- the classpath Stringparent
- the parent ClassLoader, or null if the default is to be
used
java.lang.SecurityException
- if you don't have privilages to create
class loaders
java.lang.IllegalArgumentException
- if your classpath string is silly
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |