public class PropertyExpression
extends java.lang.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
Node
s 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(java.lang.String expression)
Factory method for retrieving PropertyExpression objects for expression strings.
|
Node |
getRootNode()
Fetches the root or first node in this expression.
|
java.lang.String |
getSource()
Fetches the original 'source' of the expression - the String value that was parsed
to create the PropertyExpression object.
|
protected void |
parse(java.lang.String expression)
Performs the internal parsing of the expression and stores the results in a chain
of nodes internally.
|
java.lang.String |
toString()
Returns the String expression that was parsed to create this PropertyExpression.
|
public Node getRootNode()
public java.lang.String getSource()
public static PropertyExpression getExpression(java.lang.String expression) throws ParseException
expression
- the expression to fetch a PropertyExpression forParseException
protected void parse(java.lang.String expression) throws ParseException
expression
- the String expression to be parsedParseException
public java.lang.String toString()
toString
in class java.lang.Object
? Copyright 2005-2006, Stripes Development Team.