private static final class UberspectImpl.IndexedType extends java.lang.Object implements JexlPropertyGet
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Class<?> |
clazz
The owning class.
|
private java.lang.String |
container
The container name.
|
private java.lang.reflect.Method[] |
getters
The array of getter methods.
|
private java.lang.reflect.Method[] |
setters
The array of setter methods.
|
| Constructor and Description |
|---|
IndexedType(java.lang.String name,
java.lang.Class<?> c,
java.lang.reflect.Method[] gets,
java.lang.reflect.Method[] sets)
Creates a new indexed type.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
invoke(java.lang.Object obj)
Method used to get the property value of an object.
|
private java.lang.Object |
invokeGet(java.lang.Object object,
java.lang.Object key)
Gets the value of a property from a container.
|
private java.lang.Object |
invokeSet(java.lang.Object object,
java.lang.Object key,
java.lang.Object value)
Sets the value of a property in a container.
|
boolean |
isCacheable()
Specifies if this JexlPropertyGet is cacheable and able to be reused for
this class of object it was returned for.
|
boolean |
tryFailed(java.lang.Object rval)
Checks whether a tryInvoke failed or not.
|
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.
|
private final java.lang.String container
private final java.lang.Class<?> clazz
private final java.lang.reflect.Method[] getters
private final java.lang.reflect.Method[] setters
IndexedType(java.lang.String name,
java.lang.Class<?> c,
java.lang.reflect.Method[] gets,
java.lang.reflect.Method[] sets)
name - the container namec - the owning classgets - the array of getter methodssets - the array of setter methodspublic java.lang.Object invoke(java.lang.Object obj)
throws java.lang.Exception
invoke in interface JexlPropertyGetobj - the object to get the property value from.java.lang.Exception - on any error.public java.lang.Object tryInvoke(java.lang.Object obj,
java.lang.Object key)
tryInvoke in interface JexlPropertyGetobj - the object to invoke the property get uponkey - the property key to getpublic boolean tryFailed(java.lang.Object rval)
tryFailed in interface JexlPropertyGetrval - the value returned by tryInvokepublic boolean isCacheable()
isCacheable in interface JexlPropertyGetprivate java.lang.Object invokeGet(java.lang.Object object,
java.lang.Object key)
throws java.lang.Exception
object - the instance owning the container (not null)key - the property key (not null)java.lang.Exception - if invocation failed; IntrospectionException if a property getter could not be foundprivate java.lang.Object invokeSet(java.lang.Object object,
java.lang.Object key,
java.lang.Object value)
throws java.lang.Exception
object - the instance owning the container (not null)key - the property key (not null)value - the property value (not null)java.lang.Exception - if invocation failed; IntrospectionException if a property setter could not be found