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, iteratePointersclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitareBasicPredicates, buildContextChain, createContextForStep, evalSteps, getSingleNodePointerForSteps, getSteps, isSimplePath, isSimpleStep, searchForPathprivate 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