|
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.PrintVisitor
An abstract visitor used as a bas class for visitors wanting to print results out to a log file.
Field Summary | |
private static java.lang.String |
CFG_BASE
Base of keys in configuration file |
protected java.lang.String |
def_filename
Default file name if none supplied |
protected java.lang.String |
filename
Filename to print to |
protected java.io.PrintStream |
ps
Print stream to use for output |
Fields inherited from class mwalk.visitor.AbstractVisitor |
CFG_BASE,
eval,
seen,
verbose |
Constructor Summary | |
PrintVisitor()
Default constructor. |
|
PrintVisitor(java.lang.String filename)
Constructor. |
Method Summary | |
TreeNode[] |
getChildren(Tree tree,
TreeNode node)
Get a list of children for the current node applying correct activity semantics. |
java.lang.String |
getFilename()
Retrieve the current filename. |
boolean |
init(Tree tree)
Initialize visitor. |
void |
printData(Tree tree,
java.lang.String line)
Print a single line of data. |
void |
printData(Tree tree,
TreeNode node,
java.lang.String line)
Print a single line of data. |
protected void |
printHeader(Tree tree)
Print visitor's header info at start of file. |
void |
setFilename(java.lang.String filename)
Set the current filename prior to init(). |
Methods inherited from class mwalk.visitor.AbstractVisitor |
again,
cfgBoolean,
cfgInt,
cfgString,
cfgVisitor,
evaluator,
evaluator,
getParents,
getReceivers,
haveSeen,
haveVisited,
markSeen,
markVisited,
nextReceiver,
postfix,
prefix,
reset,
verbose,
visitDown,
visitDown,
visitUp,
visitUp,
walkDown,
walkUp |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final java.lang.String CFG_BASE
protected java.io.PrintStream ps
protected java.lang.String filename
protected java.lang.String def_filename
Constructor Detail |
public PrintVisitor()
public PrintVisitor(java.lang.String filename)
String
- new default filenameMethod Detail |
public java.lang.String getFilename()
String
current filenamepublic void setFilename(java.lang.String filename)
String
- new filenameprotected void printHeader(Tree tree)
Tree
- current tree instancepublic void printData(Tree tree, TreeNode node, java.lang.String line)
Tree
- current tree instanceTreeNode
- current tree nodeString
- line to printpublic void printData(Tree tree, java.lang.String line)
Tree
- current tree instanceString
- line to printpublic boolean init(Tree tree)
Tree
- current tree instanceboolean
whether to walk againpublic TreeNode[] getChildren(Tree tree, TreeNode node)
Tree
- current tree instanceTreeNode
- current node
|
mwalk Platform 0.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |