public abstract class AbstractViolationAdapter extends IssueParser
ViolationsParser instances. Converts the results of a ViolationsParser into a static
analysis Report.| Constructor and Description |
|---|
AbstractViolationAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected Severity |
convertSeverity(se.bjurr.violations.lib.model.SEVERITY severity,
se.bjurr.violations.lib.model.Violation violation)
Computes the
Severity from the specified SEVERITY. |
protected abstract se.bjurr.violations.lib.parsers.ViolationsParser |
createParser()
Creates a new parser instance.
|
protected void |
extractAdditionalProperties(IssueBuilder builder,
se.bjurr.violations.lib.model.Violation violation)
Sub-classes may add additional
IssueBuilder properties based on the content of the specified Violation. |
protected boolean |
isValid(se.bjurr.violations.lib.model.Violation violation)
Returns whether this violation is valid and should be converted to an
Issue. |
Report |
parse(ReaderFactory readerFactory)
Parses the specified file for issues.
|
accepts, isXmlFilepublic Report parse(ReaderFactory readerFactory) throws ParsingCanceledException, ParsingException
IssueParserparse in class IssueParserreaderFactory - provides a reader to the reportsParsingCanceledException - Signals that the parsing has been aborted by the userParsingException - Signals that during parsing a non recoverable error has been occurredprotected abstract se.bjurr.violations.lib.parsers.ViolationsParser createParser()
ViolationsParser instanceprotected boolean isValid(se.bjurr.violations.lib.model.Violation violation)
Issue. Return false if the
specified violation is a false positive or should not be counted.violation - the violation to checktrue if the violation is valid, false otherwiseprotected void extractAdditionalProperties(IssueBuilder builder, se.bjurr.violations.lib.model.Violation violation)
IssueBuilder properties based on the content of the specified Violation. This default implementation is empty.builder - the issue builder to changeviolation - the violation instanceprotected Severity convertSeverity(se.bjurr.violations.lib.model.SEVERITY severity, se.bjurr.violations.lib.model.Violation violation)
Severity from the specified SEVERITY. Sub-classes may override and use any of the
properties of the provided violation.severity - the severityviolation - the violation instanceSeverityCopyright © 2018. All rights reserved.