Enum JexlUberspect.JexlResolver
- java.lang.Object
-
- java.lang.Enum<JexlUberspect.JexlResolver>
-
- org.apache.commons.jexl3.introspection.JexlUberspect.JexlResolver
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<JexlUberspect.JexlResolver>
,JexlUberspect.PropertyResolver
- Enclosing interface:
- JexlUberspect
public static enum JexlUberspect.JexlResolver extends java.lang.Enum<JexlUberspect.JexlResolver> implements JexlUberspect.PropertyResolver
The various builtin property resolvers.Each resolver discovers how to set/get a property with different techniques; seeking method names or field names, etc.
- Since:
- 3.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTAINER
Seeks a getContainer(property) and setContainer(property, value) as inx.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.
-
Constructor Summary
Constructors Modifier Constructor Description private
JexlResolver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JexlPropertyGet
getPropertyGet(JexlUberspect uber, java.lang.Object obj, java.lang.Object identifier)
Gets a property getter.JexlPropertySet
getPropertySet(JexlUberspect uber, java.lang.Object obj, java.lang.Object identifier, java.lang.Object arg)
Gets a property setter.static JexlUberspect.JexlResolver
valueOf(java.lang.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.
-
-
-
Enum Constant Detail
-
PROPERTY
public static final JexlUberspect.JexlResolver PROPERTY
Seeks methods named get{P,p}property and is{P,p}property.
-
MAP
public static final JexlUberspect.JexlResolver MAP
Seeks map methods get/put.
-
LIST
public static final JexlUberspect.JexlResolver LIST
Seeks list methods get/set.
-
DUCK
public static final JexlUberspect.JexlResolver DUCK
Seeks any get/{set,put} method (quacking like a list or a map).
-
FIELD
public static final JexlUberspect.JexlResolver FIELD
Seeks public instance members.
-
CONTAINER
public static final JexlUberspect.JexlResolver CONTAINER
Seeks a getContainer(property) and setContainer(property, value) as inx.container.property
.
-
-
Method Detail
-
values
public static JexlUberspect.JexlResolver[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JexlUberspect.JexlResolver c : JexlUberspect.JexlResolver.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JexlUberspect.JexlResolver valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getPropertyGet
public final JexlPropertyGet getPropertyGet(JexlUberspect uber, java.lang.Object obj, java.lang.Object identifier)
Description copied from interface:JexlUberspect.PropertyResolver
Gets a property getter.- Specified by:
getPropertyGet
in interfaceJexlUberspect.PropertyResolver
- Parameters:
uber
- the uberspectobj
- the objectidentifier
- the property identifier- Returns:
- the property getter or null
-
getPropertySet
public final JexlPropertySet getPropertySet(JexlUberspect uber, java.lang.Object obj, java.lang.Object identifier, java.lang.Object arg)
Description copied from interface:JexlUberspect.PropertyResolver
Gets a property setter.- Specified by:
getPropertySet
in interfaceJexlUberspect.PropertyResolver
- Parameters:
uber
- the uberspectobj
- the objectidentifier
- the property identifierarg
- the property value- Returns:
- the property setter or null
-
-