Klasse AbstractDryParser<T>
java.lang.Object
edu.hm.hafner.analysis.IssueParser
edu.hm.hafner.analysis.parser.dry.AbstractDryParser<T>
- Typparameter:
T- the type of the parsed warnings
- Alle implementierten Schnittstellen:
Serializable
- Bekannte direkte Unterklassen:
CpdParser,DupFinderParser,SimianParser
A duplication parser template for Digester based parsers.
- Siehe auch:
-
Feldübersicht
Von Klasse geerbte Felder edu.hm.hafner.analysis.IssueParser
ADDITIONAL_PROPERTIES, CATEGORY, COLUMN_END, COLUMN_START, DESCRIPTION, FILE_NAME, FINGERPRINT, ID, LINE_END, LINE_RANGE_END, LINE_RANGE_START, LINE_RANGES, LINE_START, MESSAGE, MODULE_NAME, ORIGIN, PACKAGE_NAME, SEVERITY, TYPE -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedAbstractDryParser(int highThreshold, int normalThreshold) Creates a new instance ofAbstractDryParser. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected abstract voidconfigureParser(org.apache.commons.digester3.Digester digester) Configures the Digester parser.protected abstract ReportconvertDuplicationsToIssues(List<T> duplications, IssueBuilder issueBuilder) Converts the parsed duplications from the original format to anReportinstance.protected SeveritygetPriority(int lines) Returns the priority of the warning.parse(ReaderFactory readerFactory) Parses the specified file for issues.Von Klasse geerbte Methoden edu.hm.hafner.analysis.IssueParser
accepts, equalsIgnoreCase, isXmlFile, parseFile
-
Konstruktordetails
-
AbstractDryParser
protected AbstractDryParser(int highThreshold, int normalThreshold) Creates a new instance ofAbstractDryParser.- Parameter:
highThreshold- minimum number of duplicate lines for high priority warningsnormalThreshold- minimum number of duplicate lines for normal priority warnings
-
-
Methodendetails
-
getPriority
Returns the priority of the warning.- Parameter:
lines- number of duplicate lines- Gibt zurück:
- the priority of the warning
-
parse
Beschreibung aus Klasse kopiert:IssueParserParses the specified file for issues.- Angegeben von:
parsein KlasseIssueParser- Parameter:
readerFactory- provides a reader to the reports- Gibt zurück:
- the issues
- Löst aus:
ParsingCanceledException- Signals that the parsing has been aborted by the userParsingException- Signals that during parsing a non-recoverable error has been occurred
-
configureParser
protected abstract void configureParser(org.apache.commons.digester3.Digester digester) Configures the Digester parser. Register all rules that are required to parse the file.- Parameter:
digester- the parser to configure
-
convertDuplicationsToIssues
protected abstract Report convertDuplicationsToIssues(List<T> duplications, IssueBuilder issueBuilder) Converts the parsed duplications from the original format to anReportinstance.- Parameter:
duplications- the parsed warningsissueBuilder- the issue builder to use- Gibt zurück:
- the converted warnings
-