org.acm.seguin.summary
Class SummaryTraversal

java.lang.Object
  extended by org.acm.seguin.io.DirectoryTreeTraversal
      extended by org.acm.seguin.summary.SummaryTraversal
All Implemented Interfaces:
java.lang.Runnable

public class SummaryTraversal
extends DirectoryTreeTraversal

Summarizes a directory structure

Author:
Chris Seguin, Mike Atkinson

Constructor Summary
SummaryTraversal(java.lang.String init)
          Traverses a directory tree structure and generates a summary of the classes.
SummaryTraversal(java.lang.String init, LoadStatus initStatus)
          Traverses a directory tree structure and generates a summary of the classes.
SummaryTraversal(java.lang.String init, LoadStatus initStatus, boolean useFramework)
          Traverses a directory tree structure and generates a summary of the classes.
 
Method Summary
static void debug()
          Print everything for debugging purposes
protected  boolean isAllowed(java.io.File currentDirectory)
          Are we allowed to traverse this directory?
protected  boolean isTarget(java.io.File currentFile)
          Determines if this file should be handled by this traversal
static void main(java.lang.String[] args)
          Main program
 void run()
          Method that starts the traversal to generate the summaries.
static void setFrameworkLoader(FrameworkLoader value)
          Sets the framework loader
protected  void visit(java.io.File currentFile)
          Visits the current file
 
Methods inherited from class org.acm.seguin.io.DirectoryTreeTraversal
arriveAtDir, leaveDir, traverse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SummaryTraversal

public SummaryTraversal(java.lang.String init)
Traverses a directory tree structure and generates a summary of the classes.

Parameters:
init - the initial directory

SummaryTraversal

public SummaryTraversal(java.lang.String init,
                        LoadStatus initStatus)
Traverses a directory tree structure and generates a summary of the classes.

Parameters:
init - the initial directory
initStatus - Description of Parameter

SummaryTraversal

public SummaryTraversal(java.lang.String init,
                        LoadStatus initStatus,
                        boolean useFramework)
Traverses a directory tree structure and generates a summary of the classes.

Parameters:
init - the initial directory
initStatus - Description of Parameter
useFramework - use the framework (i.e. load JDK stubs)
Method Detail

run

public void run()
Method that starts the traversal to generate the summaries.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class DirectoryTreeTraversal

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

isAllowed

protected boolean isAllowed(java.io.File currentDirectory)
Are we allowed to traverse this directory?

Overrides:
isAllowed in class DirectoryTreeTraversal
Parameters:
currentDirectory - the directory that we are about to enter
Returns:
true if we are allowed to enter it

visit

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

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

setFrameworkLoader

public static void setFrameworkLoader(FrameworkLoader value)
Sets the framework loader

Parameters:
value - The new FrameworkLoader value

main

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

Parameters:
args - the command line arguments

debug

public static void debug()
Print everything for debugging purposes