public class DefaultGraphWalker extends java.lang.Object implements GraphWalker
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Stack<Node> |
opStack |
| Constructor and Description |
|---|
DefaultGraphWalker(Dispatcher disp)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispatch(Node nd,
java.util.Stack<Node> ndStack)
Dispatch the current operator.
|
<T> T |
dispatchAndReturn(Node nd,
java.util.Stack<Node> ndStack)
Returns dispatch result
|
java.util.Set<Node> |
getDispatchedList() |
java.util.List<Node> |
getToWalk() |
void |
startWalking(java.util.Collection<Node> startNodes,
java.util.HashMap<Node,java.lang.Object> nodeOutput)
starting point for walking.
|
void |
walk(Node nd)
walk the current operator and its descendants.
|
protected java.util.Stack<Node> opStack
public DefaultGraphWalker(Dispatcher disp)
disp - dispatcher to call for each op encounteredpublic java.util.List<Node> getToWalk()
public java.util.Set<Node> getDispatchedList()
public void dispatch(Node nd, java.util.Stack<Node> ndStack) throws SemanticException
nd - node being walkedndStack - stack of nodes encounteredSemanticExceptionpublic <T> T dispatchAndReturn(Node nd, java.util.Stack<Node> ndStack) throws SemanticException
SemanticExceptionpublic void startWalking(java.util.Collection<Node> startNodes, java.util.HashMap<Node,java.lang.Object> nodeOutput) throws SemanticException
startWalking in interface GraphWalkerstartNodes - list of starting operatorsnodeOutput - If this parameter is not null, the call to the function returns
the map from node to objects returned by the processors.SemanticExceptionpublic void walk(Node nd) throws SemanticException
nd - current operator in the graphSemanticExceptionCopyright © 2012 The Apache Software Foundation