|
mwalk Platform 0.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mwalk.visitor.AbstractVisitor | +--mwalk.visitor.PathlessVisitor
A visitor used to remove paths that do not lead back to the source.
Field Summary | |
protected int |
edges
Count of edges removed |
protected int |
nodes
Count of nodes removed |
protected java.util.Vector |
receivers
List of receivers to remove from the tree |
Fields inherited from class mwalk.visitor.AbstractVisitor |
CFG_BASE,
eval,
seen,
verbose |
Constructor Summary | |
PathlessVisitor()
Default constructor. |
Method Summary | |
int |
countEdges()
Return the number of pathless edges in the graph. |
int |
countNodes()
Return the number of pathless nodes in the graph. |
int |
countReceivers()
Return the number of pathless receivers. |
boolean |
postfix()
Whether to visit after visiting parent/children. |
int |
removeReceivers(Tree tree)
Remove receivers that were marked as pathless. |
void |
reset(Tree tree)
Reset the visitor for a new pass over the tree. |
java.lang.Object |
visitUp(Tree tree,
TreeNode node,
java.util.Vector list)
Visit the current node after visiting parent. |
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,
visitDown,
visitDown,
visitUp,
walkDown,
walkUp |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.util.Vector receivers
protected int nodes
protected int edges
Constructor Detail |
public PathlessVisitor()
Method Detail |
public int countReceivers()
int
number of pathless receivers.public int countNodes()
int
number of pathless nodespublic int countEdges()
int
number of pathless edgespublic int removeReceivers(Tree tree)
Tree
- current treeint
- number of receivers removedpublic boolean postfix()
boolean
whether to visit afterpublic void reset(Tree tree)
Tree
- vistited treepublic java.lang.Object visitUp(Tree tree, TreeNode node, java.util.Vector list) throws VisitException
Tree
- current tree instanceTreeNode
- current nodeObject
- list of return values passed back along the pathVector
optional return value to pass back along the pathVisitException
- if a problem ocurred during visit
|
mwalk Platform 0.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |