hudson.plugins.dry.parser.cpd
Class CpdParser
java.lang.Object
hudson.plugins.dry.parser.AbstractDryParser
hudson.plugins.dry.parser.cpd.CpdParser
- All Implemented Interfaces:
- hudson.plugins.analysis.core.AnnotationParser, java.io.Serializable
public class CpdParser
- extends AbstractDryParser
A parser for PMD's CPD XML files.
- Author:
- Ulli Hafner
- See Also:
- Serialized Form
|
Constructor Summary |
CpdParser(int highThreshold,
int normalThreshold)
Creates a new instance of CpdParser. |
|
Method Summary |
boolean |
accepts(java.io.InputStream file)
Returns whether this parser accepts the specified stream as a valid
file. |
java.util.Collection<hudson.plugins.analysis.util.model.FileAnnotation> |
parse(java.io.InputStream file,
java.lang.String moduleName)
Returns the duplication annotations found in the specified file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CpdParser
public CpdParser(int highThreshold,
int normalThreshold)
- Creates a new instance of
CpdParser.
- Parameters:
highThreshold - minimum number of duplicate lines for high priority warningsnormalThreshold - minimum number of duplicate lines for normal priority warnings
accepts
public boolean accepts(java.io.InputStream file)
- 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 java.util.Collection<hudson.plugins.analysis.util.model.FileAnnotation> parse(java.io.InputStream file,
java.lang.String moduleName)
throws java.lang.reflect.InvocationTargetException
- 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:
java.lang.reflect.InvocationTargetException - if the file could not be parsed (wrap your actual exception in this exception)
Copyright © 2010. All Rights Reserved.