hudson.plugins.dry.parser.simian
Class SimianParser

java.lang.Object
  extended by hudson.plugins.dry.parser.AbstractDryParser
      extended by hudson.plugins.dry.parser.simian.SimianParser
All Implemented Interfaces:
hudson.plugins.analysis.core.AnnotationParser, Serializable

public class SimianParser
extends AbstractDryParser

A parser for Simian XML files.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
SimianParser(int highThreshold, int normalThreshold)
          Creates a new instance of SimianParser.
 
Method Summary
 boolean accepts(InputStream file)
          Returns whether this parser accepts the specified stream as a valid file.
 Collection<DuplicateCode> parse(InputStream file, String moduleName)
          Returns the duplication annotations found in the specified file.
 
Methods inherited from class hudson.plugins.dry.parser.AbstractDryParser
getPriority, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimianParser

public SimianParser(int highThreshold,
                    int normalThreshold)
Creates a new instance of SimianParser.

Parameters:
highThreshold - minimum number of duplicate lines for high priority warnings
normalThreshold - minimum number of duplicate lines for normal priority warnings
Method Detail

accepts

public boolean accepts(InputStream file)
Description copied from class: AbstractDryParser
Returns whether this parser accepts the specified stream as a valid file.

Specified by:
accepts in class AbstractDryParser
Parameters:
file - the file to parse
Returns:
true if this parser accepts the specified stream as a valid file, false if the parser can't read this file

parse

public Collection<DuplicateCode> parse(InputStream file,
                                       String moduleName)
                                throws InvocationTargetException
Description copied from class: AbstractDryParser
Returns the duplication annotations found in the specified file.

Specified by:
parse in class AbstractDryParser
Parameters:
file - the file to parse
moduleName - name of the maven module
Returns:
the parsed annotations
Throws:
InvocationTargetException - if the file could not be parsed (wrap your actual exception in this exception)


Copyright © 2004-2013 Hudson. All Rights Reserved.