|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.jexl3.internal.introspection.AbstractExecutor.Set
org.apache.commons.jexl3.internal.introspection.PropertySetExecutor
public class PropertySetExecutor
Specialized executor to set a property in an object.
| Nested Class Summary | |
|---|---|
static class |
AbstractExecutor.Get
Abstract class that is used to execute an arbitrary 'get' method. |
static class |
AbstractExecutor.Method
Abstract class that is used to execute an arbitrary method. |
static class |
AbstractExecutor.Set
Abstract class that is used to execute an arbitrary 'set' method. |
| Field Summary | |
|---|---|
protected Method |
method
Method to be executed. |
protected Class<?> |
objectClass
The class this executor applies to. |
protected String |
property
The property. |
static Object |
TRY_FAILED
A marker for invocation failures in tryInvoke. |
| Constructor Summary | |
|---|---|
protected |
PropertySetExecutor(Class<?> clazz,
Method method,
String key)
Creates an instance. |
| Method Summary | |
|---|---|
static PropertySetExecutor |
discover(Introspector is,
Class<?> clazz,
String property,
Object arg)
Discovers a PropertySetExecutor. |
boolean |
equals(org.apache.commons.jexl3.internal.introspection.AbstractExecutor arg)
Indicates whether some other executor is equivalent to this one. |
boolean |
equals(Object obj)
|
Method |
getMethod()
Gets the method to be executed or used as a marker. |
String |
getMethodName()
Gets the method name used. |
Class<?> |
getTargetClass()
Gets the object class targeted by this executor. |
Object |
getTargetProperty()
Gets the property targeted by this executor. |
int |
hashCode()
|
Object |
invoke(Object o,
Object arg)
Method used to set the property value of an object. |
boolean |
isAlive()
Tell whether the executor is alive by looking at the value of the method. |
boolean |
isCacheable()
Specifies if this executor is cacheable and able to be reused for this class of object it was returned for. |
boolean |
tryFailed(Object exec)
Checks whether a tryExecute failed or not. |
Object |
tryInvoke(Object o,
Object identifier,
Object arg)
Attempts to reuse this JexlPropertySet, checking that it is compatible with the actual set of arguments. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.commons.jexl3.introspection.JexlPropertySet |
|---|
isCacheable, tryFailed |
| Field Detail |
|---|
protected final String property
public static final Object TRY_FAILED
protected final Class<?> objectClass
protected final Method method
| Constructor Detail |
|---|
protected PropertySetExecutor(Class<?> clazz,
Method method,
String key)
clazz - the class the set method applies tomethod - the method called through this executorkey - the key to use as 1st argument to the set method| Method Detail |
|---|
public static PropertySetExecutor discover(Introspector is,
Class<?> clazz,
String property,
Object arg)
The method to be found should be named "set{P,p}property.
is - the introspectorclazz - the class to find the get method fromproperty - the property name to findarg - the value to assign to the property
public Object getTargetProperty()
public Object invoke(Object o,
Object arg)
throws IllegalAccessException,
InvocationTargetException
JexlPropertySet
o - Object on which the property setter will be called with the valuearg - value to be set
IllegalAccessException
InvocationTargetException
public Object tryInvoke(Object o,
Object identifier,
Object arg)
JexlPropertySet
o - the object to invoke the the get uponidentifier - the property key to getarg - the property value to set
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(org.apache.commons.jexl3.internal.introspection.AbstractExecutor arg)
arg - the other executor to check
public final boolean isAlive()
public boolean isCacheable()
public final Method getMethod()
public final Class<?> getTargetClass()
public final String getMethodName()
public final boolean tryFailed(Object exec)
exec - the value returned by tryExecute
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||