org.acm.seguin.tools.builder
Class PrettyPrinter

java.lang.Object
  extended by org.acm.seguin.io.DirectoryTreeTraversal
      extended by org.acm.seguin.tools.builder.PrettyPrinter
All Implemented Interfaces:
java.lang.Runnable

public class PrettyPrinter
extends DirectoryTreeTraversal

Traverses a directory structure and performs all refactorings on the files.

Author:
Chris Seguin

Constructor Summary
PrettyPrinter(java.lang.String init, boolean quiet)
          Creates a refactory
 
Method Summary
protected  boolean isTarget(java.io.File currentFile)
          Determines if this file should be handled by this traversal
static void main(java.lang.String[] args)
          The main program
static void prettyPrinter(boolean quiet)
          Refactor the current file
static void prettyPrinter(java.lang.String filename, boolean quiet)
          Refactor the current file
protected  void visit(java.io.File currentFile)
          Visits the current file
 
Methods inherited from class org.acm.seguin.io.DirectoryTreeTraversal
arriveAtDir, isAllowed, leaveDir, run, traverse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrettyPrinter

public PrettyPrinter(java.lang.String init,
                     boolean quiet)
Creates a refactory

Parameters:
init - the initial directory or file
quiet - Description of Parameter
Method Detail

isTarget

protected boolean isTarget(java.io.File currentFile)
Determines if this file should be handled by this traversal

Specified by:
isTarget in class DirectoryTreeTraversal
Parameters:
currentFile - the current file
Returns:
true if the file should be handled

visit

protected void visit(java.io.File currentFile)
Visits the current file

Specified by:
visit in class DirectoryTreeTraversal
Parameters:
currentFile - the current file

main

public static void main(java.lang.String[] args)
The main program

Parameters:
args - Description of Parameter

prettyPrinter

public static void prettyPrinter(java.lang.String filename,
                                 boolean quiet)
Refactor the current file

Parameters:
filename - Description of Parameter
quiet - Description of Parameter

prettyPrinter

public static void prettyPrinter(boolean quiet)
Refactor the current file

Parameters:
quiet - Description of Parameter