Class HasNodeVisitor
java.lang.Object
org.apache.derby.impl.sql.compile.HasNodeVisitor
- All Implemented Interfaces:
Visitor
- Direct Known Subclasses:
HasTableFunctionVisitor
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHasNodeVisitor(Class<?> nodeClass) Construct a visitorHasNodeVisitor(Class<?> nodeClass, Class<?> skipOverClass) Construct a visitor -
Method Summary
Modifier and TypeMethodDescription(package private) booleanhasNode()Indicate whether we found the node in question(package private) voidreset()Reset the status so it can be run again.booleanskipChildren(Visitable node) Don't visit children under the skipOverClass node, if it isn't null.booleanStop traversal if we found the target nodeIf we have found the target node, we are done.booleanvisitChildrenFirst(Visitable node) Visit parent before children.
-
Field Details
-
hasNode
protected boolean hasNode -
nodeClass
-
skipOverClass
-
-
Constructor Details
-
HasNodeVisitor
HasNodeVisitor(Class<?> nodeClass) Construct a visitor- Parameters:
nodeClass- the class of the node that we are looking for.
-
HasNodeVisitor
-
-
Method Details
-
visit
-
stopTraversal
public boolean stopTraversal()Stop traversal if we found the target node- Specified by:
stopTraversalin interfaceVisitor- Returns:
- true/false
-
skipChildren
Don't visit children under the skipOverClass node, if it isn't null.- Specified by:
skipChildrenin interfaceVisitor- Parameters:
node- the node to process- Returns:
- true/false
-
visitChildrenFirst
Visit parent before children.- Specified by:
visitChildrenFirstin interfaceVisitor- Parameters:
node- the top node of a sub-tree about to be visited- Returns:
trueifnode's children should be visited beforenode,falseotherwise
-
hasNode
boolean hasNode()Indicate whether we found the node in question- Returns:
- true/false
-
reset
void reset()Reset the status so it can be run again.
-