public class ExpressionPath extends Path
getFoo(.)
/bar
.Expression.PointerIterator, Expression.ValueIterator
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 |
---|---|
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.
|
Object |
computeValue(EvalContext context)
Evaluates the expression.
|
protected 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] . |
String |
toString() |
areBasicPredicates, buildContextChain, createContextForStep, evalSteps, getSingleNodePointerForSteps, getSteps, isSimplePath, isSimpleStep, searchForPath
isContextDependent, iterate, iteratePointers
public ExpressionPath(Expression expression, Expression[] predicates, Step[] steps)
expression
- Expressionpredicates
- to executesteps
- navigationpublic Expression getExpression()
public Expression[] getPredicates()
public boolean computeContextDependent()
computeContextDependent
in class Path
public boolean isSimpleExpressionPath()
$x[3]/foo[2]
. The
evaluation of such "simple" paths is optimized and streamlined.public Object compute(EvalContext context)
Expression
compute
in class Expression
context
- evaluation contextpublic Object computeValue(EvalContext context)
Expression
computeValue
in class Expression
context
- evaluation contextprotected Object expressionPath(EvalContext evalContext, boolean firstMatch)
evalContext
- base contextfirstMatch
- whether to return the first match foundCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.