Default Property Name Resolver .
This class assists in resolving property names in the following four formats, with the layout of an identifying String in parentheses:
-
Simple (
name
) - The specifiedname
identifies an individual property of a particular JavaBean. The name of the actual getter or setter method to be used is determined using standard JavaBeans instrospection, a property named "xyz" will have a getter method namedgetXyz()
or (for boolean properties only)isXyz()
, and a setter method namedsetXyz()
. -
Indexed (
name[index]
) - The underlying property value is assumed to be an array. The appropriate (zero-relative) entry in the array is selected.List
objects are now also supported for read/write. -
Mapped (
name(key)
) - The JavaBean is assumed to have an property getter and setter methods with an additional attribute of typejava.lang.String
. -
Nested (
name1.name2[index].name3(key)
) - Combining mapped, nested, and indexed references is also supported.
- Since
3.2.0
- Companion
- object
Value members
Concrete methods
Return the index value from the property expression or -1.
Return the index value from the property expression or -1.
- Value Params
- expression
The property expression
- Returns
The index value or -1 if the property is not indexed
- Throws
- IllegalArgumentException
If the indexed property is illegally formed or has an invalid (non-numeric) value.
Return the map key from the property expression or null
.
Return the map key from the property expression or null
.
- Value Params
- expression
The property expression
- Returns
The index value
- Throws
- IllegalArgumentException
If the mapped property is illegally formed.
Return the property name from the property expression.
Return the property name from the property expression.
- Value Params
- expression
The property expression
- Returns
The property name
Indicates whether or not the expression contains nested property expressions or not.
Indicates whether or not the expression contains nested property expressions or not.
- Value Params
- expression
The property expression
- Returns
The next property expression
Indicate whether the expression is for an indexed property or not.
Indicate whether the expression is for an indexed property or not.
- Value Params
- expression
The property expression
- Returns
true
if the expresion is indexed, otherwisefalse
Indicate whether the expression is for a mapped property or not.
Indicate whether the expression is for a mapped property or not.
- Value Params
- expression
The property expression
- Returns
true
if the expresion is mapped, otherwisefalse
Extract the next property expression from the current expression.
Extract the next property expression from the current expression.
- Value Params
- expression
The property expression
- Returns
The next property expression