public class ExpressionPath extends Path
getFoo(.)
/bar
.Expression.PointerIterator, Expression.ValueIterator
Modifier and Type | Field | Description |
---|---|---|
private boolean |
basic |
|
private boolean |
basicKnown |
|
private Expression |
expression |
|
private Expression[] |
predicates |
NOT_A_NUMBER, ONE, ZERO
Constructor | Description |
---|---|
ExpressionPath(Expression expression,
Expression[] predicates,
Step[] steps) |
Create a new ExpressionPath.
|
Modifier and Type | Method | 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() |
isContextDependent, iterate, iteratePointers
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
areBasicPredicates, buildContextChain, createContextForStep, evalSteps, getSingleNodePointerForSteps, getSteps, isSimplePath, isSimpleStep, searchForPath
private 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 Path
public 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.Object
public java.lang.Object compute(EvalContext context)
Expression
compute
in class Expression
context
- evaluation contextpublic java.lang.Object computeValue(EvalContext context)
Expression
computeValue
in class Expression
context
- evaluation contextprotected java.lang.Object expressionPath(EvalContext evalContext, boolean firstMatch)
evalContext
- base contextfirstMatch
- whether to return the first match found