public class PropertyExpression extends Object
An expression representing a property, nested property or indexed property of a JavaBean, or
a combination of all three. Capable of parsing String property expressions into a series of
Nodes representing each sub-property or indexed property. Expression nodes can be
separated with periods, or square-bracket indexing. Items inside square brackets can be
single or double quoted, or bare int/long/float/double/boolean literals in the same manner they
appear in Java source code (e.g. 123.6F for a float).
| Modifier and Type | Method and Description |
|---|---|
static PropertyExpression |
getExpression(String expression)
Factory method for retrieving PropertyExpression objects for expression strings.
|
Node |
getRootNode()
Fetches the root or first node in this expression.
|
String |
getSource()
Fetches the original 'source' of the expression - the String value that was parsed
to create the PropertyExpression object.
|
protected void |
parse(String expression)
Performs the internal parsing of the expression and stores the results in a chain
of nodes internally.
|
String |
toString()
Returns the String expression that was parsed to create this PropertyExpression.
|
public Node getRootNode()
public String getSource()
public static PropertyExpression getExpression(String expression) throws ParseException
expression - the expression to fetch a PropertyExpression forParseExceptionprotected void parse(String expression) throws ParseException
expression - the String expression to be parsedParseException© Copyright 2005-2006, Stripes Development Team.