|
Openfire 3.5.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.util.ClassUtils
public class ClassUtils
A utility class to assist with loading classes or resources by name. Many application servers use custom classloaders, which will break uses of:
Class.forName(className);This utility attempts to load the class or resource using a number of different mechanisms to work around this problem.
Method Summary | |
---|---|
static Class |
forName(String className)
Loads the class with the specified name. |
static InputStream |
getResourceAsStream(String name)
Loads the given resource as a stream. |
Class |
loadClass(String className)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Class forName(String className) throws ClassNotFoundException
className
- the name of the class
Class
object
ClassNotFoundException
- if the class was not foundpublic static InputStream getResourceAsStream(String name)
name
- the name of the resource that exists in the classpath.
public Class loadClass(String className) throws ClassNotFoundException
ClassNotFoundException
|
Openfire 3.5.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |