edu.uci.eecs.doc.cascade.tree
Class TextTreeWriter

java.lang.Object
  extended by edu.uci.eecs.doc.cascade.tree.AbstractTreeWriter
      extended by edu.uci.eecs.doc.cascade.tree.TextTreeWriter
All Implemented Interfaces:
TreeWriter
Direct Known Subclasses:
TextTreeWriter

public class TextTreeWriter
extends AbstractTreeWriter

Exports a control flow tree to plain text format.

Author:
Trevor Harmon

Field Summary
 
Fields inherited from class edu.uci.eecs.doc.cascade.tree.AbstractTreeWriter
showInstructions, trees
 
Constructor Summary
TextTreeWriter(List<Tree> trees)
          Creates a new TextTreeWriter object for the given control flow trees.
TextTreeWriter(Tree tree)
          Creates a new TextTreeWriter object for the given control flow tree.
 
Method Summary
protected  String toString(Node node)
           
 void write(Writer out)
          Exports the control flow tree to the specified output stream.
 
Methods inherited from class edu.uci.eecs.doc.cascade.tree.AbstractTreeWriter
setShowInstructions, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextTreeWriter

public TextTreeWriter(Tree tree)
Creates a new TextTreeWriter object for the given control flow tree.

Parameters:
tree - the control flow tree to be exported

TextTreeWriter

public TextTreeWriter(List<Tree> trees)
Creates a new TextTreeWriter object for the given control flow trees.

Parameters:
trees - the control flow trees to be exported
Method Detail

write

public void write(Writer out)
Exports the control flow tree to the specified output stream.

Specified by:
write in interface TreeWriter
Specified by:
write in class AbstractTreeWriter
Parameters:
out - an output stream in which to save the tree

toString

protected String toString(Node node)