hudson.plugins.warnings.parser
Class FileWarningsParser

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

public class FileWarningsParser
extends java.lang.Object
implements AnnotationParser

A WarningsParser that scans files.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
FileWarningsParser(java.util.Set<java.lang.String> parserNames, java.lang.String defaultEncoding, java.lang.String includePattern, java.lang.String excludePattern)
          Creates a new instance of FileWarningsParser.
 
Method Summary
 java.util.Collection<FileAnnotation> parse(java.io.File 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

FileWarningsParser

public FileWarningsParser(java.util.Set<java.lang.String> parserNames,
                          java.lang.String defaultEncoding,
                          java.lang.String includePattern,
                          java.lang.String excludePattern)
Creates a new instance of FileWarningsParser.

Parameters:
parserNames - the parsers to scan the files with
defaultEncoding - the default encoding to be used when reading and parsing files
includePattern - ant file-set pattern of files to include in report
excludePattern - ant file-set pattern of files to exclude from report
Method Detail

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)


Copyright © 2009. All Rights Reserved.