Klasse JsonIssueParser

java.lang.Object
edu.hm.hafner.analysis.IssueParser
edu.hm.hafner.analysis.parser.JsonIssueParser
Alle implementierten Schnittstellen:
Serializable
Bekannte direkte Unterklassen:
AquaScannerParser, BrakemanParser, ClairParser, DockerLintParser, FlowParser, GrypeParser, HadoLintParser, OTDockerLintParser, OwaspDependencyCheckParser, PnpmAuditParser, RevApiParser, SonarQubeParser, TrivyParser, VeraCodePipelineScannerParser

public abstract class JsonIssueParser extends IssueParser
Base class for parsers that operate on a `*.json` file that contains issues in a JSON data structure.
Autor:
Ullrich Hafner
Siehe auch:
  • Konstruktordetails

    • JsonIssueParser

      public JsonIssueParser()
  • Methodendetails

    • parse

      public Report parse(ReaderFactory readerFactory) throws ParsingException
      Beschreibung aus Klasse kopiert: IssueParser
      Parses the specified file for issues.
      Angegeben von:
      parse in Klasse IssueParser
      Parameter:
      readerFactory - provides a reader to the reports
      Gibt zurück:
      the issues
      Löst aus:
      ParsingException - Signals that during parsing a non-recoverable error has been occurred
    • accepts

      public boolean accepts(ReaderFactory readerFactory)
      Beschreibung aus Klasse kopiert: IssueParser
      Returns 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.
      Setzt außer Kraft:
      accepts in Klasse IssueParser
      Parameter:
      readerFactory - provides a reader to the reports
      Gibt zurück:
      true if this parser accepts this file as valid input, or false if the file could not be parsed by this parser
    • parseJsonObject

      protected void parseJsonObject(Report report, org.json.JSONObject jsonReport, IssueBuilder issueBuilder)
      Parses the specified JSON object and populates the provided report with all issues.
      Parameter:
      report - the report to fill
      jsonReport - the input JSON report given as JSON object
      issueBuilder - build to be used to create issues
    • parseJsonArray

      protected void parseJsonArray(Report report, org.json.JSONArray jsonReport, IssueBuilder issueBuilder)
      Parses the specified JSON object and populates the provided report with all issues.
      Parameter:
      report - the report to fill
      jsonReport - the input JSON report given as JSON array
      issueBuilder - build to be used to create issues