public class XPathVisitor extends Object
Each method has the form
boolean visitComponentType(ExpressionOwner owner, ComponentType compType)
.
The ExpressionOwner argument is the owner of the component, and can
be used to reset the expression for rewriting. If a method returns
false, the sub hierarchy will not be traversed.
This class is meant to be a base class that will be derived by concrete classes, and doesn't much except return true for each method.
Constructor and Description |
---|
XPathVisitor() |
Modifier and Type | Method and Description |
---|---|
boolean |
visitBinaryOperation(ExpressionOwner owner,
Operation op)
Visit a binary operation.
|
boolean |
visitFunction(ExpressionOwner owner,
Function func)
Visit a function.
|
boolean |
visitLocationPath(ExpressionOwner owner,
LocPathIterator path)
Visit a LocationPath.
|
boolean |
visitMatchPattern(ExpressionOwner owner,
StepPattern pattern)
Visit a match pattern.
|
boolean |
visitNumberLiteral(ExpressionOwner owner,
XNumber num)
Visit a number literal.
|
boolean |
visitPredicate(ExpressionOwner owner,
Expression pred)
Visit a predicate within a location path.
|
boolean |
visitStep(ExpressionOwner owner,
NodeTest step)
Visit a step within a location path.
|
boolean |
visitStringLiteral(ExpressionOwner owner,
XString str)
Visit a string literal.
|
boolean |
visitUnaryOperation(ExpressionOwner owner,
UnaryOperation op)
Visit a unary operation.
|
boolean |
visitUnionPath(ExpressionOwner owner,
UnionPathIterator path)
Visit a UnionPath.
|
boolean |
visitUnionPattern(ExpressionOwner owner,
UnionPattern pattern)
Visit a union pattern.
|
boolean |
visitVariableRef(ExpressionOwner owner,
Variable var)
Visit a variable reference.
|
public boolean visitLocationPath(ExpressionOwner owner, LocPathIterator path)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.path
- The LocationPath object.public boolean visitUnionPath(ExpressionOwner owner, UnionPathIterator path)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.path
- The UnionPath object.public boolean visitStep(ExpressionOwner owner, NodeTest step)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.step
- The Step object.public boolean visitPredicate(ExpressionOwner owner, Expression pred)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.pred
- The predicate object.public boolean visitBinaryOperation(ExpressionOwner owner, Operation op)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.op
- The operation object.public boolean visitUnaryOperation(ExpressionOwner owner, UnaryOperation op)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.op
- The operation object.public boolean visitVariableRef(ExpressionOwner owner, Variable var)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.var
- The variable reference object.public boolean visitFunction(ExpressionOwner owner, Function func)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.func
- The function reference object.public boolean visitMatchPattern(ExpressionOwner owner, StepPattern pattern)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.pattern
- The match pattern object.public boolean visitUnionPattern(ExpressionOwner owner, UnionPattern pattern)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.pattern
- The union pattern object.public boolean visitStringLiteral(ExpressionOwner owner, XString str)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.str
- The string literal object.public boolean visitNumberLiteral(ExpressionOwner owner, XNumber num)
owner
- The owner of the expression, to which the expression can
be reset if rewriting takes place.num
- The number literal object.Copyright © 2017 JBoss by Red Hat. All rights reserved.