hudson.plugins.dry.parser.simian
Class SimianParser
java.lang.Object
hudson.plugins.dry.parser.AbstractDryParser
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimianParser
public SimianParser(int highThreshold,
int normalThreshold)
- Creates a new instance of
SimianParser.
- Parameters:
highThreshold - minimum number of duplicate lines for high priority warningsnormalThreshold - minimum number of duplicate lines for normal priority warnings
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 parsemoduleName - 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.