public static enum JexlUberspect.JexlResolver extends Enum<JexlUberspect.JexlResolver> implements JexlUberspect.PropertyResolver
Each resolver discovers how to set/get a property with different techniques; seeking method names or field names, etc.
Enum Constant and Description |
---|
CONTAINER
Seeks a getContainer(property) and setContainer(property, value) as in
x.container.property . |
DUCK
Seeks any get/{set,put} method (quacking like a list or a map).
|
FIELD
Seeks public instance members.
|
LIST
Seeks list methods get/set.
|
MAP
Seeks map methods get/put.
|
PROPERTY
Seeks methods named get{P,p}property and is{P,p}property.
|
Modifier and Type | Method and Description |
---|---|
JexlPropertyGet |
getPropertyGet(JexlUberspect uber,
Object obj,
Object identifier)
Gets a property getter.
|
JexlPropertySet |
getPropertySet(JexlUberspect uber,
Object obj,
Object identifier,
Object arg)
Gets a property setter.
|
static JexlUberspect.JexlResolver |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JexlUberspect.JexlResolver[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JexlUberspect.JexlResolver PROPERTY
public static final JexlUberspect.JexlResolver MAP
public static final JexlUberspect.JexlResolver LIST
public static final JexlUberspect.JexlResolver DUCK
public static final JexlUberspect.JexlResolver FIELD
public static final JexlUberspect.JexlResolver CONTAINER
x.container.property
.public static JexlUberspect.JexlResolver[] values()
for (JexlUberspect.JexlResolver c : JexlUberspect.JexlResolver.values()) System.out.println(c);
public static JexlUberspect.JexlResolver valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic final JexlPropertyGet getPropertyGet(JexlUberspect uber, Object obj, Object identifier)
JexlUberspect.PropertyResolver
getPropertyGet
in interface JexlUberspect.PropertyResolver
uber
- the uberspectobj
- the objectidentifier
- the property identifierpublic final JexlPropertySet getPropertySet(JexlUberspect uber, Object obj, Object identifier, Object arg)
JexlUberspect.PropertyResolver
getPropertySet
in interface JexlUberspect.PropertyResolver
uber
- the uberspectobj
- the objectidentifier
- the property identifierarg
- the property valueCopyright © 2001–2022 The Apache Software Foundation. All rights reserved.