|
||||||||||
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 ClassLoader |
getClassLoader()
Get the class loader which can be used to generate proxies without leaking memory. |
static InputStream |
getResourceAsStream(String resourceName)
Load a resource from the classpath. |
static Class |
loadClass(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 ClassLoader getClassLoader()
public static Class loadClass(String className) throws ClassNotFoundException
Class.forName(String)
.
className
- name of the class to load.
ClassNotFoundException
- if the class cannot be found in the classpath.public static InputStream getResourceAsStream(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 |