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(Class<?> theClass,
Method theMethod)
Default and sole constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract Object |
execute(Object obj)
Gets the property value from an object.
|
Object |
invoke(Object obj)
Method used to get the property value of an object.
|
Object |
tryExecute(Object obj,
Object key)
Tries to reuse this executor, checking that it is compatible with
the actual set of arguments.
|
Object |
tryInvoke(Object obj,
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, isAlive, isCacheable, tryFailed
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isCacheable, tryFailed
public final Object invoke(Object obj) throws Exception
invoke
in interface JexlPropertyGet
obj
- the object to get the property value from.Exception
- on any error.public final Object tryInvoke(Object obj, Object key)
tryInvoke
in interface JexlPropertyGet
obj
- the object to invoke the property get uponkey
- the property key to getpublic abstract Object execute(Object obj) throws IllegalAccessException, InvocationTargetException
obj
- The object to get the property from.IllegalAccessException
- Method is inaccessible.InvocationTargetException
- Method body throws an exception.public Object tryExecute(Object obj, 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.Copyright © 2016 Internet2. All rights reserved.