hudson.plugins.warnings.parser
Class ParserRegistry

java.lang.Object
  extended by hudson.plugins.warnings.parser.ParserRegistry

public class ParserRegistry
extends java.lang.Object

Registry for the active parsers in this plug-in.

Author:
Ulli Hafner

Constructor Summary
ParserRegistry()
          Creates a new instance of ParserRegistry.
ParserRegistry(java.lang.String excludePattern)
          Creates a new instance of ParserRegistry.
 
Method Summary
protected  java.io.InputStream createInputStream(java.io.File file)
          Creates the input stream to parse from the specified file.
protected  java.lang.Iterable<WarningsParser> getParsers()
          Returns all registers parsers.
 java.util.Collection<FileAnnotation> parse(java.io.File file)
          Iterates over the available parsers and parses the specified file with each parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParserRegistry

public ParserRegistry()
Creates a new instance of ParserRegistry.


ParserRegistry

public ParserRegistry(java.lang.String excludePattern)
Creates a new instance of ParserRegistry.

Parameters:
excludePattern - Ant file-set pattern of files to exclude from report, null or an empty string do not filter the output
Method Detail

getParsers

protected java.lang.Iterable<WarningsParser> getParsers()
Returns all registers parsers. Note that removal of elements is not supported.

Returns:
the registered parsers

parse

public java.util.Collection<FileAnnotation> parse(java.io.File file)
                                           throws java.io.IOException
Iterates over the available parsers and parses the specified file with each parser. Returns all found warnings.

Parameters:
file - the input stream
Returns:
all found warnings
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

createInputStream

protected java.io.InputStream createInputStream(java.io.File file)
                                         throws java.io.FileNotFoundException
Creates the input stream to parse from the specified file.

Parameters:
file - the file to parse
Returns:
the input stream
Throws:
java.io.FileNotFoundException


Copyright © 2008. All Rights Reserved.