org.apache.axis.utils
Class ClassUtils
java.lang.Object
|
+--org.apache.axis.utils.ClassUtils
- public final class ClassUtils
- extends java.lang.Object
Utility methods for Class Loading.
- Author:
- Davanum Srinvas (dims@yahoo.com)
Method Summary |
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.io.InputStream |
getResourceAsStream(java.lang.Class clazz,
java.lang.String resource)
|
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassUtils
public ClassUtils()
setClassLoader
public static void setClassLoader(java.lang.String className,
java.lang.ClassLoader loader)
- Set the ClassLoader associated with the given className.
- Parameters:
className
- the name of a class
getClassLoader
public static java.lang.ClassLoader getClassLoader(java.lang.String className)
- Obtain the ClassLoader (if any) associated with the given
className.
- Parameters:
className
- the name of a class- Returns:
- class loader
removeClassLoader
public static void removeClassLoader(java.lang.String className)
- Deregister the ClassLoader for a given className.
- Parameters:
className
- the name of a class
forName
public static java.lang.Class forName(java.lang.String className)
throws java.lang.ClassNotFoundException
- Use this method instead of Class.forName
- Parameters:
className
- Class name- Returns:
- java class
- Throws:
java.lang.ClassNotFoundException
- if the class is not found
forName
public static java.lang.Class forName(java.lang.String _className,
boolean init,
java.lang.ClassLoader _loader)
throws java.lang.ClassNotFoundException
- Use this method instead of Class.forName (String className, boolean init, ClassLoader loader)
- Parameters:
className
- Class nameinit
- initialize the classloader
- class loader- Returns:
- java class
- Throws:
java.lang.ClassNotFoundException
- if the class is not found
getResourceAsStream
public static java.io.InputStream getResourceAsStream(java.lang.Class clazz,
java.lang.String resource)
Copyright © 2003 Apache Web Services Project. All Rights Reserved.