Class DupFinderParser
java.lang.Object
edu.hm.hafner.analysis.IssueParser
edu.hm.hafner.analysis.parser.dry.AbstractDryParser<Duplicate>
edu.hm.hafner.analysis.parser.dry.dupfinder.DupFinderParser
- All Implemented Interfaces:
Serializable
A parser for Reshaper Dupfinder XML files.
- Author:
- Rafal Jasica
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofDupFinderParser.DupFinderParser(int highThreshold, int normalThreshold) Creates a new instance ofDupFinderParser. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureParser(org.apache.commons.digester3.Digester digester) Configures the Digester parser.protected ReportconvertDuplicationsToIssues(List<Duplicate> duplications, IssueBuilder issueBuilder) Converts the parsed duplications from the original format to anReportinstance.Methods inherited from class edu.hm.hafner.analysis.parser.dry.AbstractDryParser
getPriority, parseMethods inherited from class edu.hm.hafner.analysis.IssueParser
accepts, equalsIgnoreCase, isXmlFile, parseFile
-
Constructor Details
-
DupFinderParser
public DupFinderParser(int highThreshold, int normalThreshold) Creates a new instance ofDupFinderParser.- Parameters:
highThreshold- minimum number of duplicate lines for high priority warningsnormalThreshold- minimum number of duplicate lines for normal priority warnings
-
DupFinderParser
public DupFinderParser()Creates a new instance ofDupFinderParser. ThehighThresholdis set to 50, thenormalThresholdis set to 25.
-
-
Method Details
-
configureParser
protected void configureParser(org.apache.commons.digester3.Digester digester) Description copied from class:AbstractDryParserConfigures the Digester parser. Register all rules that are required to parse the file.- Specified by:
configureParserin classAbstractDryParser<Duplicate>- Parameters:
digester- the parser to configure
-
convertDuplicationsToIssues
protected Report convertDuplicationsToIssues(List<Duplicate> duplications, IssueBuilder issueBuilder) Description copied from class:AbstractDryParserConverts the parsed duplications from the original format to anReportinstance.- Specified by:
convertDuplicationsToIssuesin classAbstractDryParser<Duplicate>- Parameters:
duplications- the parsed warningsissueBuilder- the issue builder to use- Returns:
- the converted warnings
-