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(java.lang.Class<?> c,
AbstractExecutor.Method.Parameter km)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.Object |
execute(java.lang.Object obj,
java.lang.Object[] args)
Invokes the method to be executed.
|
java.lang.Class<?> |
getReturnType()
Returns the return type of the method invoked.
|
java.lang.Object |
getTargetProperty()
Gets the property targeted by this executor.
|
java.lang.Object |
invoke(java.lang.Object obj,
java.lang.Object[] params)
Invocation method, called when the method invocation should be performed
and a value returned.
|
java.lang.Object |
tryExecute(java.lang.String name,
java.lang.Object obj,
java.lang.Object[] args)
Tries to reuse this executor, checking that it is compatible with
the actual set of arguments.
|
java.lang.Object |
tryInvoke(java.lang.String name,
java.lang.Object obj,
java.lang.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, tryFailedclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisCacheable, tryFailedprotected final MethodKey key
protected AbstractExecutor.Method(java.lang.Class<?> c,
AbstractExecutor.Method.Parameter km)
c - the class this executor applies tokm - the method and MethodKey to encapsulate.public final java.lang.Object invoke(java.lang.Object obj,
java.lang.Object[] params)
throws java.lang.Exception
invoke in interface JexlMethodobj - the objectparams - method parameters.java.lang.Exception - on any error.public final java.lang.Object tryInvoke(java.lang.String name,
java.lang.Object obj,
java.lang.Object[] params)
tryInvoke in interface JexlMethodname - the method nameobj - the object to invoke the method uponparams - the method argumentspublic java.lang.Object getTargetProperty()
getTargetProperty in class AbstractExecutorpublic final java.lang.Class<?> getReturnType()
getReturnType in interface JexlMethodpublic abstract java.lang.Object execute(java.lang.Object obj,
java.lang.Object[] args)
throws java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
obj - the object to invoke the method uponargs - the method argumentsjava.lang.IllegalAccessException - Method is inaccessible.java.lang.reflect.InvocationTargetException - Method body throws an exception.public java.lang.Object tryExecute(java.lang.String name,
java.lang.Object obj,
java.lang.Object[] args)
obj - the object to invoke the method uponname - the method nameargs - the method argumentsCopyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.