|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler net.objectlab.qalab.parser.BaseStatMerge
public abstract class BaseStatMerge
This class abstract some methods used by all Stat Mergers being for Checkstyle, pmd, findbugs or Simian. This class implements some SAX callbacks for parsing the input statistics.
Constructor Summary | |
---|---|
BaseStatMerge()
|
Method Summary | |
---|---|
protected void |
addFileStatistics(int increment)
add a increment of file violation and also add it to the total violation count. |
protected void |
addNewResults()
Add new results to the compiled statistics. |
protected void |
addTotalStatistics(int increment)
|
int |
getFileCount()
|
protected int |
getFileStatistics()
|
java.lang.String |
getMergerTimeStamp()
This may have been changed to "now". |
java.lang.String |
getSrcDir()
|
protected TaskLogger |
getTaskLogger()
|
int |
getTotalStatistics()
|
protected void |
incrementFileCount(int increment)
Increment file count by increment. |
boolean |
isQuiet()
|
void |
mergeStats(org.xml.sax.InputSource source,
QALabExporter qalabExporter)
called by the ant task or the maven plug in. |
protected org.xml.sax.InputSource |
preProcessSource(org.xml.sax.InputSource source)
|
protected void |
resetFileStatistics()
reset the fileStatistics to 0, typically when handling a new file. |
void |
setCurrentFile(java.lang.String theFile)
|
void |
setMergerTimeStamp(java.lang.String timestamp,
boolean timeStampAsDate)
set the merger time stamp to use for all stats. |
void |
setQuiet(boolean noLog)
if quiet is true, the merger should limit its log output. |
void |
setSrcDir(java.lang.String directory)
this will be used to truncate machine specific path. |
void |
setTaskLogger(TaskLogger task)
set the logger to use. |
protected void |
setTotalStatistics(int value)
Directly set the total statistics. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.objectlab.qalab.parser.StatMerger |
---|
getType |
Constructor Detail |
---|
public BaseStatMerge()
Method Detail |
---|
public final void setCurrentFile(java.lang.String theFile)
theFile
- the current file for which the stats are processed.public final boolean isQuiet()
public final void setQuiet(boolean noLog)
StatMerger
setQuiet
in interface StatMerger
noLog
- true if no log required.public final void setTaskLogger(TaskLogger task)
setTaskLogger
in interface StatMerger
task
- the logger.protected final TaskLogger getTaskLogger()
public final void setSrcDir(java.lang.String directory)
setSrcDir
in interface StatMerger
directory
- the source directory.public final java.lang.String getSrcDir()
protected final void addNewResults()
public int getTotalStatistics()
getTotalStatistics
in interface StatMerger
protected final void addTotalStatistics(int increment)
increment
- add increment to total number of violations.protected final void setTotalStatistics(int value)
value
- public final int getFileCount()
getFileCount
in interface StatMerger
protected final void incrementFileCount(int increment)
increment
- increase file count by this value.protected final int getFileStatistics()
protected final void addFileStatistics(int increment)
increment
- value to add to the number of fileStatistics.protected final void resetFileStatistics()
public final void mergeStats(org.xml.sax.InputSource source, QALabExporter qalabExporter)
mergeStats
in interface StatMerger
source
- the Reader from the statistics file.qalabExporter
- the QALabExporter to use for saving the stats.protected org.xml.sax.InputSource preProcessSource(org.xml.sax.InputSource source)
public final void setMergerTimeStamp(java.lang.String timestamp, boolean timeStampAsDate)
setMergerTimeStamp
in interface StatMerger
timestamp
- the timestamp "YYYY-MM-dd HH:mm:ss"timeStampAsDate
- The timeStampAsDateOnly to set.public final java.lang.String getMergerTimeStamp()
getMergerTimeStamp
in interface StatMerger
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |