public class ClassUtils extends Object
Constructor and Description |
---|
ClassUtils() |
Modifier and Type | Method and Description |
---|---|
static Class<?> |
classFor(String className,
ClassLoader loader)
Same as Class.forName exception logs the class loader stack before
crashing.
|
static Object |
instantiate(String className,
ClassLoader loader)
Instantiates a Class but converts the exception if it fails.
|
static Class<?> |
primitiveTypeForName(String className)
Provide the primitive class for the name.
|
static Class<?> |
primitiveTypeForWrapper(Class<?> wrapperType)
Provide the primitive type for a wrapper class.
|
static Class<?> |
wrapperClassForPrimitive(Class<?> primitiveType)
Provide the wrapper class for a primitive type.
|
public static Class<?> primitiveTypeForName(String className)
className
- The class name.public static Class<?> wrapperClassForPrimitive(Class<?> primitiveType)
primitiveType
- public static Class<?> primitiveTypeForWrapper(Class<?> wrapperType)
wrapperType
- public static Class<?> classFor(String className, ClassLoader loader) throws ClassNotFoundException
className
- loader
- ClassNotFoundException
public static Object instantiate(String className, ClassLoader loader) throws ArooaException
className
- loader
- ArooaException