public final class MethodExecutor extends AbstractExecutor.Method
AbstractExecutor.Method.ParameterAbstractExecutor.Get, AbstractExecutor.Method, AbstractExecutor.Setkeymethod, objectClass, TRY_FAILED| Constructor and Description |
|---|
MethodExecutor(Introspector is,
Object obj,
String name,
Object[] args)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
execute(Object o,
Object[] args)
Invokes the method to be executed.
|
protected Object[] |
handleVarArg(Class<?> type,
int index,
Object[] actual)
Reassembles arguments if the method is a vararg method.
|
Object |
tryExecute(String name,
Object obj,
Object[] args)
Tries to reuse this executor, checking that it is compatible with
the actual set of arguments.
|
getReturnType, getTargetProperty, invoke, tryInvokeequals, equals, getMethod, getMethodName, getTargetClass, hashCode, isAlive, isCacheable, tryFailedclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisCacheable, tryFailedpublic MethodExecutor(Introspector is, Object obj, String name, Object[] args)
is - the introspector used to discover the methodobj - the object to find the method inname - the method nameargs - the method argumentspublic Object execute(Object o, Object[] args) throws IllegalAccessException, InvocationTargetException
execute in class AbstractExecutor.Methodo - the object to invoke the method uponargs - the method argumentsIllegalAccessException - Method is inaccessible.InvocationTargetException - Method body throws an exception.public Object tryExecute(String name, Object obj, Object[] args)
tryExecute in class AbstractExecutor.Methodname - the method nameobj - the object to invoke the method uponargs - the method argumentsprotected Object[] handleVarArg(Class<?> type, int index, Object[] actual)
type - The vararg class type (aka component type
of the expected array arg)index - The index of the vararg in the method declaration
(This will always be one less than the number of
expected arguments.)actual - The actual parameters being passed to this methodCopyright © 2020 Internet2. All rights reserved.