mwalk Platform 0.3.0

mwalk.visitor
Interface UpVisitor

All Known Implementing Classes:
RandomPathVisitor, GlobalVisitor, PathlessVisitor, PrimaryPathVisitor, JoinVisitor, TraceVisitor

public interface UpVisitor
extends Visitor

A standrard interface for interacting with visitors that walk the tree from receivers to source.

Version:
1.0
Author:
Robert Chalmers

Method Summary
 TreeNode[] getParents(Tree tree, TreeNode node)
          Get a list of parents for the current node applying correct activity semantics.
 java.util.Enumeration getReceivers(Tree tree)
          Get a list of active receivers.
 boolean nextReceiver(Tree tree, Receiver recv)
          Check whether the next receiver should start a visiting path.
 java.lang.Object visitUp(Tree tree, TreeNode node)
          Visit the current node prior to visiting parent.
 java.lang.Object visitUp(Tree tree, TreeNode node, java.util.Vector list)
          Visit the current node after visiting parent.
 boolean walkUp()
          Whether to walk up the tree.
 
Methods inherited from interface mwalk.visitor.Visitor
again, evaluator, evaluator, init, postfix, prefix, reset, verbose
 

Method Detail

walkUp

public boolean walkUp()
Whether to walk up the tree.
Returns:
boolean whether to walk up the tree

nextReceiver

public boolean nextReceiver(Tree tree,
                            Receiver recv)
Check whether the next receiver should start a visiting path.
Parameters:
Tree - current tree instance
Receiver - next receiver
Returns:
boolean whether to visit next receiver

getReceivers

public java.util.Enumeration getReceivers(Tree tree)
Get a list of active receivers.
Parameters:
Tree - current tree instance
Returns:
Enumeration list of receivers to visit

visitUp

public java.lang.Object visitUp(Tree tree,
                                TreeNode node)
                         throws VisitException
Visit the current node prior to visiting parent.
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

visitUp

public java.lang.Object visitUp(Tree tree,
                                TreeNode node,
                                java.util.Vector list)
                         throws VisitException
Visit the current node after visiting parent.
Parameters:
Tree - current tree instance
TreeNode - current node
Object - list of return values passed back along the path
Returns:
Vector optional return value to pass back along the path
Throws:
VisitException - if a problem ocurred during visit

getParents

public TreeNode[] getParents(Tree tree,
                             TreeNode node)
Get a list of parents for the current node applying correct activity semantics.
Parameters:
Tree - current tree instance
TreeNode - current node
Returns:
TreeNode[] array of parent nodes of currently visited node

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