org.apache.axis.utils
public final class ClassUtils extends Object
Method Summary | |
---|---|
static ClassLoader | createClassLoader(String classpath, ClassLoader parent)
Creates a new ClassLoader from a classpath specification and a parent
class loader.
|
static Class | forName(String className)
Use this method instead of Class.forName
|
static Class | forName(String _className, boolean init, ClassLoader _loader)
Use this method instead of Class.forName (String className, boolean init, ClassLoader loader)
|
static ClassLoader | getClassLoader(String className)
Obtain the ClassLoader (if any) associated with the given
className.
|
static ClassLoader | getDefaultClassLoader() |
static InputStream | getResourceAsStream(Class clazz, String resource, boolean checkThreadContextFirst)
Get an input stream from a named resource.
|
static InputStream | getResourceAsStream(Class clazz, String resource)
Get an input stream from a named resource.
|
static void | removeClassLoader(String className)
Deregister the ClassLoader for a given className.
|
static void | setClassLoader(String className, ClassLoader loader)
Set the ClassLoader associated with the given className. |
static void | setDefaultClassLoader(ClassLoader loader)
Set the default ClassLoader. |
Parameters: classpath the classpath String parent the parent ClassLoader, or null if the default is to be used
Throws: SecurityException if you don't have privilages to create class loaders IllegalArgumentException if your classpath string is silly
Parameters: className Class name
Returns: java class
Throws: ClassNotFoundException if the class is not found
Parameters: _className Class name init initialize the class _loader class loader
Returns: java class
Throws: ClassNotFoundException if the class is not found
Parameters: className the name of a class
Returns: class loader
Parameters: clazz class to use in the lookups resource resource string to look for checkThreadContextFirst check the thread context first?
Returns: input stream if found, or null
Parameters: clazz class to use in the lookups resource resource string to look for
Returns: input stream if found, or null
Parameters: className the name of a class
Parameters: className the name of a class loader the ClassLoader for the class
Parameters: loader the new default ClassLoader