rj.tools.jcsc
Interface ResultsFormatter

All Known Implementing Classes:
AbstractResultsFormatter

public interface ResultsFormatter

ResultsFormatter - Formatter of the parsing results.

Version:
$Revision: 1.8 $
Author:
Ralph Jocham

Method Summary
 void format()
          format the results from one parsed file
 void formatBatch()
          format the batch run results.
 void setAuthors(java.util.List authors)
          setAuthors - set the values of the @author tags found
 void setBatchMode(BatchSummary batchSummary)
          Set if the JCSC run was in batch mode or single file and set the associated data.
 void setClassName(java.lang.String name)
          setClass - the name of the class
 void setMethodMetrics(java.util.List metrics)
          setMethodMetrics - set all the method metrics
 void setMethodsCount(int count)
          setMethodsCount - the number of methods count
 void setNCSSCount(int count)
          setNCSSCount - the number of NCSS non commenting source statements
 void setOutputStream(java.io.OutputStream os)
          setOutputStream - set the outputstream to write to
 void setPackage(java.lang.String name)
          setPackage - the name of the package the class belongs to
 void setUnitTestClassCount(int count)
          setUnitTestClassCount - the count of unit test classes
 void setUnitTestsCount(int count)
          setUnitTestsCount - the count of unit tests
 void setViolations(java.util.List violations)
          setViolations - set all the violations which occured
 void setViolationsCount(int count)
          setViolationsCount - the count of violations
 void setViolationSorter(ViolationsSorter sorter)
          Set the algorithm for how the violations shall be sorted
 

Method Detail

setOutputStream

public void setOutputStream(java.io.OutputStream os)
setOutputStream - set the outputstream to write to
Parameters:
os - an OutputStream value

setViolations

public void setViolations(java.util.List violations)
setViolations - set all the violations which occured
Parameters:
violations - a Collection of Violation

setMethodMetrics

public void setMethodMetrics(java.util.List metrics)
setMethodMetrics - set all the method metrics
Parameters:
metrics - a Collection of MethodMetrics

setPackage

public void setPackage(java.lang.String name)
setPackage - the name of the package the class belongs to
Parameters:
name - a String value

setClassName

public void setClassName(java.lang.String name)
setClass - the name of the class
Parameters:
name - a String value

setAuthors

public void setAuthors(java.util.List authors)
setAuthors - set the values of the @author tags found
Parameters:
authors - a Collection value

setViolationsCount

public void setViolationsCount(int count)
setViolationsCount - the count of violations
Parameters:
count - an int value

setUnitTestClassCount

public void setUnitTestClassCount(int count)
setUnitTestClassCount - the count of unit test classes
Parameters:
count - an int value

setUnitTestsCount

public void setUnitTestsCount(int count)
setUnitTestsCount - the count of unit tests
Parameters:
count - an int value

setNCSSCount

public void setNCSSCount(int count)
setNCSSCount - the number of NCSS non commenting source statements
Parameters:
count - an int value

setMethodsCount

public void setMethodsCount(int count)
setMethodsCount - the number of methods count
Parameters:
count - an int value

setViolationSorter

public void setViolationSorter(ViolationsSorter sorter)
Set the algorithm for how the violations shall be sorted
Parameters:
sorter -  

setBatchMode

public void setBatchMode(BatchSummary batchSummary)
Set if the JCSC run was in batch mode or single file and set the associated data. The defaul is NONE batch mode
Parameters:
batchSummary - all data from batch run

format

public void format()
format the results from one parsed file

formatBatch

public void formatBatch()
format the batch run results. this method is additionally called to each call format() for each parsed file. This method should be used to generate additionally batch related files. This method has to be callled after method format() has been called on each parsed file.


(c) 1999-2004 by Ralph Jocham (rjocham72@netscape.net)
JCSC is released under the terms of the GNU General Public License