public class ExpressionPath extends Path
getFoo(.)
/bar.Expression.PointerIterator, Expression.ValueIterator| Modifier and Type | Field and Description |
|---|---|
private boolean |
basic |
private boolean |
basicKnown |
private Expression |
expression |
private Expression[] |
predicates |
NOT_A_NUMBER, ONE, ZERO| Constructor and Description |
|---|
ExpressionPath(Expression expression,
Expression[] predicates,
Step[] steps)
Create a new ExpressionPath.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
compute(EvalContext context)
Evaluates the expression.
|
boolean |
computeContextDependent()
Returns true if the root expression or any of the
predicates or the path steps are context dependent.
|
java.lang.Object |
computeValue(EvalContext context)
Evaluates the expression.
|
protected java.lang.Object |
expressionPath(EvalContext evalContext,
boolean firstMatch)
Walks an expression path (a path that starts with an expression)
|
Expression |
getExpression()
Get the expression.
|
Expression[] |
getPredicates()
Predicates are the expressions in brackets that may follow
the root expression of the path.
|
boolean |
isSimpleExpressionPath()
Recognized paths formatted as
$x[3]/foo[2]. |
java.lang.String |
toString() |
areBasicPredicates, buildContextChain, createContextForStep, evalSteps, getSingleNodePointerForSteps, getSteps, isSimplePath, isSimpleStep, searchForPathisContextDependent, iterate, iteratePointersprivate Expression expression
private Expression[] predicates
private boolean basicKnown
private boolean basic
public ExpressionPath(Expression expression, Expression[] predicates, Step[] steps)
expression - Expressionpredicates - to executesteps - navigationpublic Expression getExpression()
public Expression[] getPredicates()
public boolean computeContextDependent()
computeContextDependent in class Pathpublic boolean isSimpleExpressionPath()
$x[3]/foo[2]. The
evaluation of such "simple" paths is optimized and streamlined.public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object compute(EvalContext context)
Expressioncompute in class Expressioncontext - evaluation contextpublic java.lang.Object computeValue(EvalContext context)
ExpressioncomputeValue in class Expressioncontext - evaluation contextprotected java.lang.Object expressionPath(EvalContext evalContext, boolean firstMatch)
evalContext - base contextfirstMatch - whether to return the first match found