public abstract static class AbstractExecutor.Method extends AbstractExecutor implements JexlMethod
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractExecutor.Method.Parameter
A helper class to pass the method & parameters.
|
AbstractExecutor.Get, AbstractExecutor.Method, AbstractExecutor.Set
Modifier and Type | Field and Description |
---|---|
protected MethodKey |
key
The method key discovered from the arguments.
|
method, objectClass, TRY_FAILED
Modifier | Constructor and Description |
---|---|
protected |
AbstractExecutor.Method(Class<?> c,
AbstractExecutor.Method.Parameter km)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
abstract Object |
execute(Object obj,
Object[] args)
Invokes the method to be executed.
|
Class<?> |
getReturnType()
Returns the return type of the method invoked.
|
Object |
getTargetProperty()
Gets the property targeted by this executor.
|
Object |
invoke(Object obj,
Object[] params)
Invocation method, called when the method invocation should be performed
and a value returned.
|
Object |
tryExecute(String name,
Object obj,
Object[] args)
Tries to reuse this executor, checking that it is compatible with
the actual set of arguments.
|
Object |
tryInvoke(String name,
Object obj,
Object[] params)
Attempts to reuse this JexlMethod, checking that it is compatible with
the actual set of arguments.
|
equals, equals, getMethod, getMethodName, getTargetClass, hashCode, isAlive, isCacheable, tryFailed
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isCacheable, tryFailed
protected final MethodKey key
protected AbstractExecutor.Method(Class<?> c, AbstractExecutor.Method.Parameter km)
c
- the class this executor applies tokm
- the method and MethodKey to encapsulate.public final Object invoke(Object obj, Object[] params) throws Exception
invoke
in interface JexlMethod
obj
- the objectparams
- method parameters.Exception
- on any error.public final Object tryInvoke(String name, Object obj, Object[] params)
tryInvoke
in interface JexlMethod
name
- the method nameobj
- the object to invoke the method uponparams
- the method argumentspublic Object getTargetProperty()
getTargetProperty
in class AbstractExecutor
public final Class<?> getReturnType()
getReturnType
in interface JexlMethod
public abstract Object execute(Object obj, Object[] args) throws IllegalAccessException, InvocationTargetException
obj
- 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)
obj
- the object to invoke the method uponname
- the method nameargs
- the method argumentsCopyright © 2016 Internet2. All rights reserved.