public class ClassUtil extends Object
| Constructor and Description |
|---|
ClassUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Class<?> |
forNameByThread(String clsName)
Returns the Class object of the specified class name, using
the current thread's context class loader.
|
static Method |
getCloseMethod(Class<?> cls,
String name,
Class<?>[] argTypes)
Gets one of the close methods -- a close method is a method
with the same name and the compatible argument type.
|
static boolean |
isInstance(Object value,
Class<?> clz) |
static Object |
newInstance(Class<?> cls,
Object[] args)
Instantiates a new instance of the specified class with the
specified argument.
|
public static final Method getCloseMethod(Class<?> cls, String name, Class<?>[] argTypes) throws NoSuchMethodException
NoSuchMethodExceptionpublic static final Object newInstance(Class<?> cls, Object[] args) throws NoSuchMethodException, InstantiationException, InvocationTargetException, IllegalAccessException
public static final Class<?> forNameByThread(String clsName) throws ClassNotFoundException
ClassNotFoundExceptionCopyright © 2016. All rights reserved.