public final class MapGetExecutor extends AbstractExecutor.Get
AbstractExecutor.Get, AbstractExecutor.Method, AbstractExecutor.Set
Modifier and Type | Field and Description |
---|---|
private static java.lang.reflect.Method |
MAP_GET
The java.util.map.get method used as an active marker in MapGet.
|
private java.lang.Object |
property
The property.
|
method, objectClass, TRY_FAILED
Constructor and Description |
---|
MapGetExecutor(Introspector is,
java.lang.Class<?> clazz,
java.lang.Object key)
Creates an instance checking for the Map interface.
|
Modifier and Type | Method and Description |
---|---|
(package private) static java.lang.reflect.Method |
discover(java.lang.Class<?> clazz)
Finds the method to perform 'get' on a map.
|
java.lang.Object |
execute(java.lang.Object obj)
Get the property from the map.
|
java.lang.Object |
getTargetProperty()
Gets the property targeted by this executor.
|
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.
|
invoke, tryInvoke
equals, equals, getMethod, getMethodName, getTargetClass, hashCode, initMarker, isAlive, isCacheable, makeArgs, tryFailed
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isCacheable, tryFailed
private static final java.lang.reflect.Method MAP_GET
private final java.lang.Object property
public MapGetExecutor(Introspector is, java.lang.Class<?> clazz, java.lang.Object key)
is
- the introspectorclazz
- the class that might implement the map interfacekey
- the key to use in map.get(key)public java.lang.Object getTargetProperty()
getTargetProperty
in class AbstractExecutor
public java.lang.Object execute(java.lang.Object obj)
execute
in class AbstractExecutor.Get
obj
- the map.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).
tryExecute
in class AbstractExecutor.Get
obj
- The object to get the property from.key
- The property to get from the object.static java.lang.reflect.Method discover(java.lang.Class<?> clazz)
clazz
- the class to introspect