com.unitesk.atp.tree
Class TreePrinter

java.lang.Object
  extended by com.unitesk.atp.tree.TreePrinter

public class TreePrinter
extends Object

Dump tree structure for debugging

Version:
$Id: TreePrinter.java,v 1.4 2005/11/30 10:06:18 all-x Exp $
Author:
Alexey Demakov

Field Summary
protected  ExceptionHandler exceptionHandler
           
protected  IndentFilter indentFilter
           
protected  Writer writer
           
 
Constructor Summary
protected TreePrinter(Writer writer, ExceptionHandler exceptionHandler, int indentStep)
           
 
Method Summary
protected  void block_nl()
           
protected  void block()
           
 void close()
          Close output stream
static TreePrinter create(File file, ExceptionHandler exceptionHandler)
           
static TreePrinter create(File file, ExceptionHandler exceptionHandler, int indentStep)
           
static TreePrinter create(String file, ExceptionHandler exceptionHandler)
           
static TreePrinter create(String file, ExceptionHandler exceptionHandler, int indentStep)
           
static TreePrinter create(Writer writer, ExceptionHandler exceptionHandler)
           
static TreePrinter create(Writer writer, ExceptionHandler exceptionHandler, int indentStep)
           
protected  void dumpAttribute(Node node, String name, Object value)
           
protected  void dumpNode(Node node)
           
 void dumpTree(Node node)
          Dump subtree.
 void dumpTree(Tree tree)
          Dump tree
protected  void incIndent()
           
protected  void nl()
           
protected  void popIndent()
           
protected  void txt(String s)
           
protected  void unblock_nl()
           
protected  void unblock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

protected Writer writer

indentFilter

protected IndentFilter indentFilter

exceptionHandler

protected ExceptionHandler exceptionHandler
Constructor Detail

TreePrinter

protected TreePrinter(Writer writer,
                      ExceptionHandler exceptionHandler,
                      int indentStep)
Method Detail

create

public static TreePrinter create(String file,
                                 ExceptionHandler exceptionHandler)

create

public static TreePrinter create(String file,
                                 ExceptionHandler exceptionHandler,
                                 int indentStep)

create

public static TreePrinter create(File file,
                                 ExceptionHandler exceptionHandler)

create

public static TreePrinter create(File file,
                                 ExceptionHandler exceptionHandler,
                                 int indentStep)

create

public static TreePrinter create(Writer writer,
                                 ExceptionHandler exceptionHandler)

create

public static TreePrinter create(Writer writer,
                                 ExceptionHandler exceptionHandler,
                                 int indentStep)

close

public void close()
Close output stream


dumpTree

public void dumpTree(Tree tree)
Dump tree

Parameters:
tree - Tree to be dumped

dumpTree

public void dumpTree(Node node)
Dump subtree.

Parameters:
node - Subtree root node.

incIndent

protected final void incIndent()

popIndent

protected final void popIndent()

txt

protected final void txt(String s)

nl

protected final void nl()

block

protected final void block()

unblock

protected final void unblock()

block_nl

protected final void block_nl()

unblock_nl

protected final void unblock_nl()

dumpNode

protected void dumpNode(Node node)

dumpAttribute

protected void dumpAttribute(Node node,
                             String name,
                             Object value)


Copyright © 2001-2006 ISP RAS, RedVerst Group. All Rights Reserved.