T - the type of the parsed warningspublic abstract class AbstractDryParser<T> extends AbstractParser
DEPRECATION, PROPRIETARY_API| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDryParser(int highThreshold,
int normalThreshold)
Creates a new instance of
AbstractDryParser. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
configureParser(org.apache.commons.digester3.Digester digester)
Configures the Digester parser.
|
protected abstract Report |
convertDuplicationsToIssues(List<T> duplications)
Converts the parsed duplications from the original format to an
Report instance. |
protected Severity |
getPriority(int lines)
Returns the priority of the warning.
|
Report |
parse(Reader reader,
Function<String,String> preProcessor)
Parses the specified input stream for issues.
|
getFileName, guessCategory, guessCategoryIfEmpty, parse, parse, parseIntaccepts, isXmlFile, parseprotected AbstractDryParser(int highThreshold,
int normalThreshold)
AbstractDryParser.highThreshold - minimum number of duplicate lines for high priority warningsnormalThreshold - minimum number of duplicate lines for normal priority warningsprotected Severity getPriority(int lines)
lines - number of duplicate linespublic Report parse(Reader reader, Function<String,String> preProcessor) throws ParsingCanceledException, ParsingException
AbstractParserparse in class AbstractParserreader - the reader to get the text frompreProcessor - pre processes each input line before handing it to the actual parserParsingCanceledException - Signals that the parsing has been aborted by the userParsingException - Signals that during parsing a non recoverable error has been occurredprotected abstract void configureParser(org.apache.commons.digester3.Digester digester)
digester - the parser to configureCopyright © 2018. All rights reserved.