public class ClassReflect extends java.lang.Object implements ClassReflect
| Constructor and Description |
|---|
ClassReflect() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.reflect.Method |
getCloseMethod(java.lang.Class<?> cls,
java.lang.String name,
java.lang.Class<?>[] argTypes)
Gets one of the close methods -- a close method is a method
with the same name and the compatible argument type.
|
java.lang.ClassLoader |
getContextClassLoader(java.lang.Class<?> reference)
Returns the context ClassLoader for the reference class.
|
java.lang.Object |
newInstance(java.lang.Class<?> cls,
java.lang.Object[] args)
Instantiates a new instance of the specified class with the
specified argument.
|
public java.lang.reflect.Method getCloseMethod(java.lang.Class<?> cls,
java.lang.String name,
java.lang.Class<?>[] argTypes)
throws java.lang.NoSuchMethodException
getCloseMethod in interface ClassReflectjava.lang.NoSuchMethodExceptionpublic java.lang.Object newInstance(java.lang.Class<?> cls,
java.lang.Object[] args)
throws java.lang.NoSuchMethodException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
newInstance in interface ClassReflectjava.lang.NoSuchMethodExceptionjava.lang.InstantiationExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessExceptionpublic java.lang.ClassLoader getContextClassLoader(java.lang.Class<?> reference)
getContextClassLoader in interface ClassReflectreference - the reference class where it is invoked from.Copyright © 2005-2011 Potix Corporation. All Rights Reserved.