|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.jdbc.api.PlanVisitor
public abstract class PlanVisitor
A helper class to walk a query plan and execute some action at each node. Subclasses should override the appropriate visit() methods to get notification when a node of each type is visited.
| Constructor Summary | |
|---|---|
PlanVisitor()
Construct the visitor with a reference to the root node. |
|
| Method Summary | |
|---|---|
void |
visit(PlanNode rootNode)
This method controls how a tree is visited from the rootNode. |
protected abstract void |
visitContainerProperty(PlanNode node,
java.lang.String propertyName,
java.util.Collection propertyValue)
Visit a container property - the container property will be visited, then each particular value of the container will be visited. |
protected abstract void |
visitNode(PlanNode node)
Visit a node. |
protected abstract void |
visitPropertyValue(PlanNode node,
java.lang.String propertyName,
java.lang.Object propertyValue)
Visit a property value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlanVisitor()
| Method Detail |
|---|
public void visit(PlanNode rootNode)
This method controls how a tree is visited from the rootNode. This implementation will walk the tree in pre-order (a node is visited before it's children) and will visit a particular node in the following order: node itself, each property of the node, and finally the children of the node, in order.
Subclasses may override this method to manipulate the visitor order if desired.
rootNode - The rootNode of the treeprotected abstract void visitNode(PlanNode node)
node - The node being visited
protected abstract void visitPropertyValue(PlanNode node,
java.lang.String propertyName,
java.lang.Object propertyValue)
node - The node being visitedpropertyName - The property name being visitedpropertyValue - The property value being visited
protected abstract void visitContainerProperty(PlanNode node,
java.lang.String propertyName,
java.util.Collection propertyValue)
node - The node being visitedpropertyName - The property name being visitedpropertyValue - The collection value being visited
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||