public abstract class AbstractResultsFormatter extends java.lang.Object implements ResultsFormatter
AbstractResultsFormatter - Shows the results on the console in a compiler
typcial way| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
mAuthors
mAuthors the authors of that class; if several authors
then names are separated by ',' |
protected BatchSummary |
mBatchSummary
all data from the batchrun
|
protected java.lang.String |
mClass
mClass the name of the class |
protected int |
mLineCount
mLineCount the number of Lines |
protected java.util.List |
mMethodMetrics
mMethodMetrics the collection of all metrics |
protected int |
mMethodsCount
mNCSSCount the number of methods (non commenting source statements) |
protected int |
mNCSSCount
mNCSSCount the number of NCSS (non commenting source statements) |
protected java.io.OutputStream |
mOutputStream
mOutputStream is the stream to write the formated output |
protected java.lang.String |
mPackage
mPackage the package the class belongs to |
protected int |
mUnitTestClassCount
mUnitTestClassCount the number of Unit test classes |
protected int |
mUnitTestsCount
mUnitTestsCount the number of Unit tests |
protected java.util.List |
mViolations
mViolations the collection of all violations |
protected int |
mViolationsCount
mViolationsCount the number of vioalations |
protected ViolationsSorter |
mViolationsSorter
Encapsulation of sorting algorithmus for violations
|
| Constructor and Description |
|---|
AbstractResultsFormatter() |
| Modifier and Type | Method and Description |
|---|---|
void |
formatBatch()
Format the batch run results.
|
protected boolean |
isBatchMode()
in batch mode
|
void |
setAuthors(java.util.List authors)
setAuthors |
void |
setBatchMode(BatchSummary batchSummary)
Set that the JCSC was in batch mode and pass in the associated
data
|
void |
setClassName(java.lang.String name)
setClassName |
void |
setLineCount(int count)
setLineCount |
void |
setMethodMetrics(java.util.List metrics)
setMethodMetrics |
void |
setMethodsCount(int count)
setMethodsCount |
void |
setNCSSCount(int count)
setNCSSCount |
void |
setOutputStream(java.io.OutputStream os)
setOutputStream |
void |
setPackage(java.lang.String name)
setPackage |
void |
setUnitTestClassCount(int count)
setUnitTestClassCount |
void |
setUnitTestsCount(int count)
setUnitTestsCount |
void |
setViolations(java.util.List violations)
setViolations |
void |
setViolationsCount(int count)
setViolationsCount |
void |
setViolationSorter(ViolationsSorter sorter)
Set the algorithm for how the violations shall be sorted
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitformatprotected java.io.OutputStream mOutputStream
mOutputStream is the stream to write the formated outputprotected java.lang.String mAuthors
mAuthors the authors of that class; if several authors
then names are separated by ','protected java.util.List mViolations
mViolations the collection of all violationsprotected java.util.List mMethodMetrics
mMethodMetrics the collection of all metricsprotected java.lang.String mPackage
mPackage the package the class belongs toprotected java.lang.String mClass
mClass the name of the classprotected int mViolationsCount
mViolationsCount the number of vioalationsprotected int mUnitTestClassCount
mUnitTestClassCount the number of Unit test classesprotected int mUnitTestsCount
mUnitTestsCount the number of Unit testsprotected int mNCSSCount
mNCSSCount the number of NCSS (non commenting source statements)protected int mLineCount
mLineCount the number of Linesprotected int mMethodsCount
mNCSSCount the number of methods (non commenting source statements)protected BatchSummary mBatchSummary
protected ViolationsSorter mViolationsSorter
public void setOutputStream(java.io.OutputStream os)
setOutputStreamsetOutputStream in interface ResultsFormatteros - an OutputStream valueResultsFormatterpublic void setAuthors(java.util.List authors)
setAuthorssetAuthors in interface ResultsFormatterauthors - a Collection valueResultsFormatterpublic void setViolations(java.util.List violations)
setViolationssetViolations in interface ResultsFormatterviolations - a Collection valueResultsFormatterpublic void setMethodMetrics(java.util.List metrics)
setMethodMetricssetMethodMetrics in interface ResultsFormattermetrics - a Collection valueResultsFormatterpublic void setPackage(java.lang.String name)
setPackagesetPackage in interface ResultsFormattername - a String valueResultsFormatterpublic void setClassName(java.lang.String name)
setClassNamesetClassName in interface ResultsFormattername - a String valueResultsFormatterpublic void setViolationsCount(int count)
setViolationsCountsetViolationsCount in interface ResultsFormattercount - an int valueResultsFormatterpublic void setUnitTestClassCount(int count)
setUnitTestClassCountsetUnitTestClassCount in interface ResultsFormattercount - an int valueResultsFormatterpublic void setUnitTestsCount(int count)
setUnitTestsCountsetUnitTestsCount in interface ResultsFormattercount - an int valueResultsFormatterpublic void setNCSSCount(int count)
setNCSSCountsetNCSSCount in interface ResultsFormattercount - an int valueResultsFormatterpublic void setLineCount(int count)
setLineCountsetLineCount in interface ResultsFormattercount - an int valueResultsFormatterpublic void setMethodsCount(int count)
setMethodsCountsetMethodsCount in interface ResultsFormattercount - an int valueResultsFormatterpublic void setViolationSorter(ViolationsSorter sorter)
setViolationSorter in interface ResultsFormattersorter - public void setBatchMode(BatchSummary batchSummary)
setBatchMode in interface ResultsFormatterbatchSummary - protected boolean isBatchMode()
public void formatBatch()
formatBatch in interface ResultsFormatter
JCSC is released under the terms of the GNU General Public License