hudson.plugins.findbugs
Class FindBugsCounter

java.lang.Object
  extended by hudson.plugins.findbugs.FindBugsCounter

public class FindBugsCounter
extends java.lang.Object

Counts the number of bugs in a FindBugs analysis file.

Author:
Ulli Hafner

Constructor Summary
FindBugsCounter(hudson.model.Build<?,?> build)
          Creates a new instance of FindBugsCounter.
 
Method Summary
 JavaProject findBugs()
          Scans all the FindBugs files in the specified directory and returns the result as a JavaProject.
 hudson.FilePath getWorkingDirectory()
          Returns the working directory with the FindBugs results.
protected  Module parse(java.io.InputStream file)
          Returns the parsed FindBugs analysis file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindBugsCounter

public FindBugsCounter(hudson.model.Build<?,?> build)
Creates a new instance of FindBugsCounter.

Parameters:
build - the associated build
Method Detail

parse

protected Module parse(java.io.InputStream file)
                throws java.io.IOException,
                       org.xml.sax.SAXException
Returns the parsed FindBugs analysis file.

Parameters:
file - the FindBugs analysis file
Returns:
the parsed result (stored in the module instance)
Throws:
java.io.IOException - if the file could not be parsed
org.xml.sax.SAXException - if the file is not in valid XML format

getWorkingDirectory

public hudson.FilePath getWorkingDirectory()
Returns the working directory with the FindBugs results.

Returns:
the working directory

findBugs

public JavaProject findBugs()
                     throws java.io.IOException,
                            java.lang.InterruptedException,
                            org.xml.sax.SAXException
Scans all the FindBugs files in the specified directory and returns the result as a JavaProject.

Returns:
the results
Throws:
java.io.IOException - if the files could not be read
java.lang.InterruptedException - if the operation has been canceled
org.xml.sax.SAXException - if the file is not in valid XML format


Copyright © 2007. All Rights Reserved.