org.apache.commons.jexl3.introspection
Enum JexlUberspect.JexlResolver

java.lang.Object
  extended by java.lang.Enum<JexlUberspect.JexlResolver>
      extended by org.apache.commons.jexl3.introspection.JexlUberspect.JexlResolver
All Implemented Interfaces:
Serializable, Comparable<JexlUberspect.JexlResolver>, JexlUberspect.PropertyResolver
Enclosing interface:
JexlUberspect

public static enum JexlUberspect.JexlResolver
extends 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
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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 in x.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(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getPropertyGet

public final JexlPropertyGet getPropertyGet(JexlUberspect uber,
                                            Object obj,
                                            Object identifier)
Description copied from interface: JexlUberspect.PropertyResolver
Gets a property getter.

Specified by:
getPropertyGet in interface JexlUberspect.PropertyResolver
Parameters:
uber - the uberspect
obj - the object
identifier - the property identifier
Returns:
the property getter or null

getPropertySet

public final JexlPropertySet getPropertySet(JexlUberspect uber,
                                            Object obj,
                                            Object identifier,
                                            Object arg)
Description copied from interface: JexlUberspect.PropertyResolver
Gets a property setter.

Specified by:
getPropertySet in interface JexlUberspect.PropertyResolver
Parameters:
uber - the uberspect
obj - the object
identifier - the property identifier
arg - the property value
Returns:
the property setter or null


Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.