mwalk Platform 0.3.0

mwalk.visitor
Class MergeVisitor

java.lang.Object
  |
  +--mwalk.visitor.AbstractVisitor
        |
        +--mwalk.visitor.MergeVisitor

public class MergeVisitor
extends AbstractVisitor
implements DownVisitor

A visitor used by the builder to merge the period tables.

Version:
1.0
Author:
Robert Chalmers

Fields inherited from class mwalk.visitor.AbstractVisitor
CFG_BASE, eval, seen, verbose
 
Constructor Summary
MergeVisitor()
          Default constructor.
 
Method Summary
 boolean postfix()
          Whether to visit after visiting parent/children.
 void reset(Tree tree)
          Reset the visitor for a new pass over the tree.
 java.lang.Object visitDown(Tree tree, TreeNode node)
          Visit the current node prior to visiting children.
 java.lang.Object visitDown(Tree tree, TreeNode node, java.util.Vector list)
          Visit the current node after visiting children.
 
Methods inherited from class mwalk.visitor.AbstractVisitor
again, cfgBoolean, cfgInt, cfgString, cfgVisitor, evaluator, evaluator, getChildren, getParents, getReceivers, haveSeen, haveVisited, init, markSeen, markVisited, nextReceiver, prefix, verbose, visitUp, visitUp, walkDown, walkUp
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

MergeVisitor

public MergeVisitor()
Default constructor.
Method Detail

postfix

public boolean postfix()
Whether to visit after visiting parent/children.
Overrides:
postfix in class AbstractVisitor
Returns:
boolean whether to visit after

reset

public void reset(Tree tree)
Reset the visitor for a new pass over the tree.
Overrides:
reset in class AbstractVisitor
Parameters:
Tree - vistited tree

visitDown

public java.lang.Object visitDown(Tree tree,
                                  TreeNode node)
Visit the current node prior to visiting children. This method is called if prefix() returns true.
Specified by:
visitDown in interface DownVisitor
Overrides:
visitDown in class AbstractVisitor
Parameters:
Tree - current tree instance
TreeNode - current node
Returns:
Object optional return value to pass back along the path
Throws:
VisitException - if a problem ocurred during visit

visitDown

public java.lang.Object visitDown(Tree tree,
                                  TreeNode node,
                                  java.util.Vector list)
                           throws VisitException
Visit the current node after visiting children. This method is called if postfix() returns true.
Specified by:
visitDown in interface DownVisitor
Overrides:
visitDown in class AbstractVisitor
Parameters:
Tree - current tree instance
TreeNode - current node
Vector - list of return values passed back along the path
Returns:
Object optional return value to pass back along the path
Throws:
VisitException - if a problem ocurred during visit

mwalk Platform 0.3.0

Submit a bug or feature mwalk Platform API Specification 0.3.0
Sensitivity: {Public:Research}
Copyright(c) 2000, Robert Chalmers