hudson.plugins.findbugs.parser.maven
Class MavenFindBugsParser

java.lang.Object
  extended by hudson.plugins.findbugs.parser.maven.MavenFindBugsParser

public class MavenFindBugsParser
extends java.lang.Object

A parser for the maven-findbugs-plugin XML files (version <= 1.1.1).


Constructor Summary
MavenFindBugsParser()
           
 
Method Summary
 boolean accepts(java.io.InputStream file)
          Returns whether this parser accepts the specified file format.
 void mapFiles(MavenModule mavenModule, java.lang.String[] files)
          Maps each class with an warning to a workspace file.
 MavenModule parse(java.io.InputStream file, java.lang.String moduleName)
          Returns the parsed FindBugs analysis file.
 MavenModule parse(java.io.InputStream file, java.lang.String moduleName, java.io.File workspace)
          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

MavenFindBugsParser

public MavenFindBugsParser()
Method Detail

accepts

public boolean accepts(java.io.InputStream file)
Returns whether this parser accepts the specified file format.

Parameters:
file - the file to parse
Returns:
true if the provided file is in maven format.

parse

public MavenModule parse(java.io.InputStream file,
                         java.lang.String moduleName,
                         java.io.File workspace)
                  throws java.io.IOException,
                         org.xml.sax.SAXException,
                         java.lang.InterruptedException
Returns the parsed FindBugs analysis file. This scanner accepts files in the Maven FindBugs plug-in format.

Parameters:
file - the FindBugs analysis file
moduleName - name of the maven module
workspace - workspace root
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
java.lang.InterruptedException - if the user aborts the mapping

mapFiles

public void mapFiles(MavenModule mavenModule,
                     java.lang.String[] files)
Maps each class with an warning to a workspace file.

Parameters:
mavenModule - the module containing the warnings
files - the java files in the workspace

parse

public MavenModule parse(java.io.InputStream file,
                         java.lang.String moduleName)
                  throws java.io.IOException,
                         org.xml.sax.SAXException
Returns the parsed FindBugs analysis file. This scanner accepts files in the Maven FindBugs plug-in format.

Parameters:
file - the FindBugs analysis file
moduleName - name of the maven module
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


Copyright © 2008. All Rights Reserved.