public abstract static class AbstractExecutor.Get extends AbstractExecutor implements JexlPropertyGet
AbstractExecutor.Get, AbstractExecutor.Method, AbstractExecutor.Set
method, objectClass, TRY_FAILED
Modifier | Constructor and Description |
---|---|
protected |
Get(java.lang.Class<?> theClass,
java.lang.reflect.Method theMethod)
Default and sole constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
execute(java.lang.Object obj)
Gets the property value from an object.
|
java.lang.Object |
invoke(java.lang.Object obj)
Method used to get the property value of an object.
|
java.lang.Object |
tryExecute(java.lang.Object obj,
java.lang.Object key)
Tries to reuse this executor, checking that it is compatible with
the actual set of arguments.
|
java.lang.Object |
tryInvoke(java.lang.Object obj,
java.lang.Object key)
Attempts to reuse this JexlPropertyGet, checking that it is compatible with
the actual set of arguments.
|
equals, equals, getMethod, getMethodName, getTargetClass, getTargetProperty, hashCode, initMarker, isAlive, isCacheable, makeArgs, tryFailed
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isCacheable, tryFailed
protected Get(java.lang.Class<?> theClass, java.lang.reflect.Method theMethod)
theClass
- the class this executor applies totheMethod
- the method held by this executorpublic final java.lang.Object invoke(java.lang.Object obj) throws java.lang.Exception
invoke
in interface JexlPropertyGet
obj
- the object to get the property value from.java.lang.Exception
- on any error.public final java.lang.Object tryInvoke(java.lang.Object obj, java.lang.Object key)
tryInvoke
in interface JexlPropertyGet
obj
- the object to invoke the property get uponkey
- the property key to getpublic abstract java.lang.Object execute(java.lang.Object obj) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
obj
- The object to get the property from.java.lang.IllegalAccessException
- Method is inaccessible.java.lang.reflect.InvocationTargetException
- Method body throws an exception.public java.lang.Object tryExecute(java.lang.Object obj, java.lang.Object key)
Compatibility means that:
o
must be of the same class as this executor's
target class and
property
must be of the same class as this
executor's target property (for list and map based executors) and have the same
value (for other types).
obj
- The object to get the property from.key
- The property to get from the object.