|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.util.ClassLoaderUtil
public final class ClassLoaderUtil
Keeps all classloading in ehcache consistent.
Method Summary | |
---|---|
static Object |
createNewInstance(String className)
Creates a new class instance. |
static Object |
createNewInstance(String className,
Class[] argTypes,
Object[] args)
Creates a new class instance and passes args to the constructor call. |
static ClassLoader |
getFallbackClassLoader()
Gets a fallback ClassLoader that all classes in ehcache, and extensions,
should use for classloading. |
static ClassLoader |
getStandardClassLoader()
Gets the ClassLoader that all classes in ehcache, and extensions, should
use for classloading. |
static Class |
loadClass(String className)
Load the given class by name |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ClassLoader getStandardClassLoader()
ClassLoader
that all classes in ehcache, and extensions, should
use for classloading. All ClassLoading in ehcache should use this one. This is the only
thing that seems to work for all of the class loading situations found in the wild.
public static ClassLoader getFallbackClassLoader()
ClassLoader
that all classes in ehcache, and extensions,
should use for classloading. This is used if the context class loader does not work.
ClassLoaderUtil.class.getClassLoader();
public static Object createNewInstance(String className) throws CacheException
className
- a fully qualified class name
CacheException
- if instance cannot be created due to a missing class or exceptionpublic static Object createNewInstance(String className, Class[] argTypes, Object[] args) throws CacheException
className
- a fully qualified class nameargTypes
- Types for constructor argument parametersargs
- Values for constructor argument parameters
CacheException
- if instance cannot be created due to a missing class or exceptionpublic static Class loadClass(String className) throws ClassNotFoundException
className
- a fully qualified class name
ClassNotFoundException
- if the class cannot be loaded
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |