hudson.plugins.findbugs.parser
Class FindBugsParser

java.lang.Object
  extended by hudson.plugins.findbugs.parser.FindBugsParser
All Implemented Interfaces:
AnnotationParser, java.io.Serializable

public class FindBugsParser
extends java.lang.Object
implements AnnotationParser

A parser for FindBugs XML files.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
FindBugsParser(hudson.FilePath workspace)
          Creates a new instance of FindBugsParser.
 
Method Summary
 java.lang.String getName()
          Returns the name of this parser.
 java.util.Collection<FileAnnotation> parse(java.io.File file, java.lang.String moduleName)
          Returns the annotations found in the specified file.
 java.util.Collection<FileAnnotation> parse(java.io.InputStream file, java.lang.String moduleName)
          Returns the annotations found in the specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FindBugsParser

public FindBugsParser(hudson.FilePath workspace)
Creates a new instance of FindBugsParser.

Parameters:
workspace - the workspace folder to be used as basis for source code mapping
Method Detail

getName

public java.lang.String getName()
Returns the name of this parser.

Specified by:
getName in interface AnnotationParser
Returns:
the name of this parser

parse

public java.util.Collection<FileAnnotation> parse(java.io.File file,
                                                  java.lang.String moduleName)
                                           throws java.lang.reflect.InvocationTargetException
Returns the annotations found in the specified file.

Specified by:
parse in interface AnnotationParser
Parameters:
file - the file to parse
moduleName - name of the maven module
Returns:
the parsed result (stored in the module instance)
Throws:
java.lang.reflect.InvocationTargetException - if the file could not be parsed (wrap your exception in this exception)

parse

public java.util.Collection<FileAnnotation> parse(java.io.InputStream file,
                                                  java.lang.String moduleName)
                                           throws java.lang.reflect.InvocationTargetException
Returns the annotations found in the specified file.

Specified by:
parse in interface AnnotationParser
Parameters:
file - the file to parse
moduleName - name of the maven module
Returns:
the parsed result (stored in the module instance)
Throws:
java.lang.reflect.InvocationTargetException - if the file could not be parsed (wrap your exception in this exception)


Copyright © 2008. All Rights Reserved.