public final class ClassLoaderUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
createNewInstance(ClassLoader loader,
String className)
Creates a new class instance with the given loader.
|
static Object |
createNewInstance(ClassLoader loader,
String className,
Class[] argTypes,
Object[] args)
Creates a new class instance and passes args to the constructor call.
|
public static Object createNewInstance(ClassLoader loader, String className) throws CacheException
loader
- the classloader to load the classclassName
- a fully qualified class nameCacheException
- if instance cannot be created due to a missing class or exceptionpublic static Object createNewInstance(ClassLoader loader, String className, Class[] argTypes, Object[] args) throws CacheException
loader
- the classloader to load the classclassName
- a fully qualified class nameargTypes
- Types for constructor argument parametersargs
- Values for constructor argument parametersCacheException
- if instance cannot be created due to a missing class or exceptionCopyright © 2003–2016 Terracotta, Inc.. All rights reserved.