net.objectlab.qalab.parser
Class FindBugsStatMerge

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by net.objectlab.qalab.parser.BaseStatMerge
          extended by net.objectlab.qalab.parser.CheckstyleOrPMDBaseMerge
              extended by net.objectlab.qalab.parser.FindBugsStatMerge
All Implemented Interfaces:
StatMerger, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class FindBugsStatMerge
extends CheckstyleOrPMDBaseMerge

This class is able to read the XDOC output from FindBugs and integrate the violation results into our qalab.xml format.

Version:
$Revision: 187 $
Author:
Benoit Xhenseval
See Also:
FindBugs at SourceForge

Constructor Summary
FindBugsStatMerge()
           
 
Method Summary
protected  java.lang.String getFileNameAttribute()
           
protected  java.lang.String getFileTag()
           
 java.lang.String getType()
           
protected  java.lang.String getViolationTag()
           
protected  void setFileName(org.xml.sax.Attributes att)
          Given the different ways that files can be stored on file system, this method will remove anything part of the path up to the 'srcDir' given, it should only retain the package name in java.
 
Methods inherited from class net.objectlab.qalab.parser.CheckstyleOrPMDBaseMerge
endElement, startElement
 
Methods inherited from class net.objectlab.qalab.parser.BaseStatMerge
addFileStatistics, addNewResults, addTotalStatistics, getFileCount, getFileStatistics, getMergerTimeStamp, getSrcDir, getTaskLogger, getTotalStatistics, incrementFileCount, isQuiet, mergeStats, preProcessSource, resetFileStatistics, setCurrentFile, setMergerTimeStamp, setQuiet, setSrcDir, setTaskLogger, setTotalStatistics
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindBugsStatMerge

public FindBugsStatMerge()
Method Detail

getFileTag

protected final java.lang.String getFileTag()
Specified by:
getFileTag in class CheckstyleOrPMDBaseMerge
Returns:
"file"

getFileNameAttribute

protected final java.lang.String getFileNameAttribute()
Specified by:
getFileNameAttribute in class CheckstyleOrPMDBaseMerge
Returns:
classname

getViolationTag

protected final java.lang.String getViolationTag()
Specified by:
getViolationTag in class CheckstyleOrPMDBaseMerge
Returns:
BugInstance

getType

public final java.lang.String getType()
Returns:
findbugs

setFileName

protected final void setFileName(org.xml.sax.Attributes att)
Given the different ways that files can be stored on file system, this method will remove anything part of the path up to the 'srcDir' given, it should only retain the package name in java. For instance, for Findbugs classname="net.objectlab.X" will be stored in the compiled stats as: net/objectlab/A.java

Overrides:
setFileName in class CheckstyleOrPMDBaseMerge
Parameters:
att - the XML attribute