Package edu.hm.hafner.analysis.parser
Class OTDockerLintParser
- java.lang.Object
-
- edu.hm.hafner.analysis.IssueParser
-
- edu.hm.hafner.analysis.parser.JsonIssueParser
-
- edu.hm.hafner.analysis.parser.OTDockerLintParser
-
- All Implemented Interfaces:
Serializable
public class OTDockerLintParser extends JsonIssueParser
A parser for ot-docker-linter json output.- Author:
- Abhishek Dubey
- See Also:
- ot-docker-linter, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OTDockerLintParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(ReaderFactory readerFactory)Returns whether this parser accepts the specified file as valid input.protected voidparseJsonArray(Report report, org.json.JSONArray jsonReport, IssueBuilder issueBuilder)Parses the specified JSON object and populates the provided report with all issues.protected voidparseJsonObject(Report report, org.json.JSONObject jsonIssue, IssueBuilder issueBuilder)Parses the specified JSON object and populates the provided report with all issues.-
Methods inherited from class edu.hm.hafner.analysis.parser.JsonIssueParser
parse
-
Methods inherited from class edu.hm.hafner.analysis.IssueParser
equalsIgnoreCase, isXmlFile, parseFile
-
-
-
-
Method Detail
-
accepts
public boolean accepts(ReaderFactory readerFactory)
Description copied from class:IssueParserReturns whether this parser accepts the specified file as valid input. Parsers may reject a file if it is in the wrong format to avoid exceptions during parsing.- Overrides:
acceptsin classJsonIssueParser- Parameters:
readerFactory- provides a reader to the reports- Returns:
trueif this parser accepts this file as valid input, orfalseif the file could not be parsed by this parser
-
parseJsonArray
protected void parseJsonArray(Report report, org.json.JSONArray jsonReport, IssueBuilder issueBuilder)
Description copied from class:JsonIssueParserParses the specified JSON object and populates the provided report with all issues.- Overrides:
parseJsonArrayin classJsonIssueParser- Parameters:
report- the report to filljsonReport- the input JSON report given as JSON arrayissueBuilder- build to be used to create issues
-
parseJsonObject
protected void parseJsonObject(Report report, org.json.JSONObject jsonIssue, IssueBuilder issueBuilder)
Description copied from class:JsonIssueParserParses the specified JSON object and populates the provided report with all issues.- Overrides:
parseJsonObjectin classJsonIssueParser- Parameters:
report- the report to filljsonIssue- the input JSON report given as JSON objectissueBuilder- build to be used to create issues
-
-