|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.northwestern.at.utils.DynamicCall
public class DynamicCall
DynamicCall.
DynamicCall provides methods for dynamically calling methods in classes
with specified arguments. The class may be specified by its class type or
by name. The method is provided by name. The list of parameters
is passed as an ArgumentList
. DynamicCall uses Java reflection.
Constructor Summary | |
---|---|
protected |
DynamicCall()
Don't allow instantiation, do allow overrides. |
Method Summary | |
---|---|
static java.lang.Object |
dynamicCall(java.lang.Object classToCall,
java.lang.String methodName,
ArgumentList argumentList)
Use reflection to call a named method from a specified class. |
static java.lang.Object |
dynamicCall(java.lang.String className,
java.lang.String methodName,
ArgumentList argumentList)
Use reflection to call a named method from a named class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DynamicCall()
Method Detail |
---|
public static java.lang.Object dynamicCall(java.lang.Object classToCall, java.lang.String methodName, ArgumentList argumentList) throws java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
classToCall
- The class containing the method to call.methodName
- The method name to call.argumentList
- The argument list.
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
public static java.lang.Object dynamicCall(java.lang.String className, java.lang.String methodName, ArgumentList argumentList) throws java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.lang.InstantiationException
className
- The class name containing the method to call.methodName
- The method name to call.argumentList
- The argument list.
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.InstantiationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |