sofya.apps.dejavu
Class OutputAdapter

java.lang.Object
  extended by sofya.apps.dejavu.OutputAdapter

public class OutputAdapter
extends java.lang.Object

Adapter class which is responsible for the display of test selection results and the writing of those results to a database file.

Version:
09/22/2004
Author:
Rogan Creswick, Alex Kinneer

Constructor Summary
OutputAdapter(java.lang.String fileName, java.lang.String tag, int totalTests)
          Standard constructor, initializes basic information required by the output adapter.
 
Method Summary
 void addSelected(java.lang.String methodName, sofya.apps.dejavu.SelectionData selected)
          Adds test selection information about a method.
 void print(int format)
          Prints the output to standard output.
 void writeTestSelectionFile()
          Writes the test selection information to a database file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputAdapter

public OutputAdapter(java.lang.String fileName,
                     java.lang.String tag,
                     int totalTests)
Standard constructor, initializes basic information required by the output adapter.

Parameters:
fileName - Name of the output file to be written.
tag - Database tag to be associated with the output file (can be null).
totalTests - Total number of tests from which test selection may occur.
Method Detail

addSelected

public void addSelected(java.lang.String methodName,
                        sofya.apps.dejavu.SelectionData selected)
Adds test selection information about a method.

Parameters:
methodName - Name of the method for which test selection data is being recorded for output.
selected - Selection data object containing the test selection data being recorded.

writeTestSelectionFile

public void writeTestSelectionFile()
                            throws java.io.IOException
Writes the test selection information to a database file.

Throws:
java.io.IOException - For any IO error which prevents successful creation of the test selection file.

print

public void print(int format)
           throws java.io.IOException
Prints the output to standard output.

Parameters:
format - Display format to be used for the output.
Throws:
java.io.IOException