|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.dry.parser.AbstractDryParser
public abstract class AbstractDryParser
A base class for duplicate code parsers. Use this class as a starting point
for your duplication result parser and register an instance in the
DuplicationParserRegistry.
| Constructor Summary | |
|---|---|
AbstractDryParser(int highThreshold,
int normalThreshold)
Creates a new instance of AbstractDryParser. |
|
| Method Summary | |
|---|---|
protected abstract boolean |
accepts(java.io.InputStream inputStream)
Returns whether this parser accepts the specified stream as a valid file. |
protected hudson.plugins.analysis.util.model.Priority |
getPriority(int lines)
Returns the priority of the warning. |
java.util.Collection<hudson.plugins.analysis.util.model.FileAnnotation> |
parse(java.io.File file,
java.lang.String moduleName)
|
protected abstract java.util.Collection<hudson.plugins.analysis.util.model.FileAnnotation> |
parse(java.io.InputStream inputStream,
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 |
| Constructor Detail |
|---|
public AbstractDryParser(int highThreshold,
int normalThreshold)
AbstractDryParser.
highThreshold - minimum number of duplicate lines for high priority warningsnormalThreshold - minimum number of duplicate lines for normal priority warnings| Method Detail |
|---|
public java.util.Collection<hudson.plugins.analysis.util.model.FileAnnotation> parse(java.io.File file,
java.lang.String moduleName)
throws java.lang.reflect.InvocationTargetException
parse in interface hudson.plugins.analysis.core.AnnotationParserjava.lang.reflect.InvocationTargetException
protected abstract java.util.Collection<hudson.plugins.analysis.util.model.FileAnnotation> parse(java.io.InputStream inputStream,
java.lang.String moduleName)
throws java.lang.reflect.InvocationTargetException
inputStream - the file to parsemoduleName - name of the maven module
java.lang.reflect.InvocationTargetException - if the file could not be parsed (wrap your actual exception in this exception)protected abstract boolean accepts(java.io.InputStream inputStream)
inputStream - the file to parse
true if this parser accepts the specified stream as
a valid file, false if the parser can't read this fileprotected hudson.plugins.analysis.util.model.Priority getPriority(int lines)
lines - number of duplicate lines
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||