|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbitronix.tm.utils.ClassLoaderUtils
public class ClassLoaderUtils
Static utility methods for loading classes and resources.
Constructor Summary | |
---|---|
ClassLoaderUtils()
|
Method Summary | |
---|---|
static java.io.InputStream |
getResourceAsStream(java.lang.String resourceName)
Load a resource from the classpath. |
static java.lang.Class |
loadClass(java.lang.String className)
Load a class by name. |
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 className) throws java.lang.ClassNotFoundException
Class.forName(String)
.
className
- name of the class to load.
java.lang.ClassNotFoundException
- if the class cannot be found in the classpath.public static java.io.InputStream getResourceAsStream(java.lang.String resourceName)
ClassLoader.getResourceAsStream(String)
using this class' classloader.
resourceName
- the resource name to load.
InputStream
if the resource could be found, null otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |