|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.yestech.lib.lang.Clazz
public final class Clazz
Utility Class for Dealing with Class and Reflection.
| Method Summary | ||
|---|---|---|
static java.lang.Class |
getClass(java.lang.String classFqn)
Looks up and retrieves an Initialized class. |
|
static java.lang.reflect.Constructor |
getConstructor(java.lang.Class clazz,
java.lang.Class[] ctorTypes)
Returns a Cached Constructor associated with the Class. |
|
static java.lang.reflect.Method |
getMethod(java.lang.Class clazz,
java.lang.String methodName,
java.lang.Class[] argTypes)
Returns a Cached Method associated by the methodName. |
|
static java.lang.reflect.Method |
getMethod(java.lang.String classFQN,
java.lang.String methodName,
java.lang.Class[] params)
Returns the Method that is a associated with the FQN class. |
|
static
|
instantiateClass(java.lang.Class clazz)
Instantiates a Class from a Class. |
|
static
|
instantiateClass(java.lang.String classFQN)
Instantiates a Class from a Fully Qualified Name. |
|
static java.lang.Object |
invoke(java.lang.reflect.Method method,
java.lang.Object[] methodArgs,
java.lang.Object instance)
Dynamically invokes a method using the supplied params as the parameters for the call. |
|
static java.lang.Object |
invoke(java.lang.String classFQN,
java.lang.String methodName,
java.lang.Class[] params,
java.lang.Object[] methodArgs,
java.lang.Object instance)
Dynamically invokes a method using the supplied params as the parameters for the call. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.Class getClass(java.lang.String classFqn)
classFqn - FQN of the class to initialize
java.lang.RuntimeException - If error happens Loading or Initializingpublic static <I> I instantiateClass(java.lang.String classFQN)
classFQN - FQN of the class to Instantiate
java.lang.RuntimeException - If error happens Instantiatingpublic static <I> I instantiateClass(java.lang.Class clazz)
clazz - Class to Instantiate
java.lang.RuntimeException - If error happens Instantiating
public static java.lang.reflect.Method getMethod(java.lang.String classFQN,
java.lang.String methodName,
java.lang.Class[] params)
classFQN - The FQN of the class method is a member ofmethodName - The method nameparams - Array of Class the are in the method parameter list
Method found
java.lang.RuntimeException - If error happens Loading Method
public static java.lang.Object invoke(java.lang.reflect.Method method,
java.lang.Object[] methodArgs,
java.lang.Object instance)
method - Method to invokemethodArgs - Parameters that will be passed to the methodinstance - Instance of the Onject to invoke method on. (null if method is static)
java.lang.RuntimeException - If error happens Invoking Method
public static java.lang.Object invoke(java.lang.String classFQN,
java.lang.String methodName,
java.lang.Class[] params,
java.lang.Object[] methodArgs,
java.lang.Object instance)
classFQN - The FQN of the class method is a member ofmethodName - The method nameparams - Array of Class the are in the method parameter listmethodArgs - Parameters that will be passed to the methodinstance - Instance of the Onject to invoke method on. (null if method is static)
java.lang.RuntimeException - If error happens Invoking Method
public static java.lang.reflect.Method getMethod(java.lang.Class clazz,
java.lang.String methodName,
java.lang.Class[] argTypes)
clazz - Class method associated withmethodName - Name of the methodargTypes - Class Array of argument types in method signature
public static java.lang.reflect.Constructor getConstructor(java.lang.Class clazz,
java.lang.Class[] ctorTypes)
clazz - Class Constructor associated withctorTypes - Class Array of argument types in Constructors signature
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||