Class AbstractJsonReportImporter


  • public abstract class AbstractJsonReportImporter
    extends Object
    • Field Detail

      • jsonParser

        protected static final org.sonarsource.analyzer.commons.internal.json.simple.parser.JSONParser jsonParser
      • context

        protected final org.sonar.api.batch.sensor.SensorContext context
    • Constructor Detail

      • AbstractJsonReportImporter

        protected AbstractJsonReportImporter​(org.sonar.api.batch.sensor.SensorContext context,
                                             AnalysisWarningsWrapper analysisWarnings,
                                             String warningPrefix)
    • Method Detail

      • importReport

        public void importReport​(File reportFile)
      • parseJson

        protected List<org.sonarsource.analyzer.commons.internal.json.simple.JSONArray> parseJson​(File reportFile)
      • parseFileAsArray

        protected org.sonarsource.analyzer.commons.internal.json.simple.JSONArray parseFileAsArray​(File reportFile)
                                                                                            throws IOException,
                                                                                                   org.sonarsource.analyzer.commons.internal.json.simple.parser.ParseException
        Throws:
        IOException
        org.sonarsource.analyzer.commons.internal.json.simple.parser.ParseException
      • saveIssues

        protected int saveIssues​(org.sonarsource.analyzer.commons.internal.json.simple.JSONArray issuesJson)
      • toExternalIssue

        protected abstract org.sonar.api.batch.sensor.issue.NewExternalIssue toExternalIssue​(org.sonarsource.analyzer.commons.internal.json.simple.JSONObject issueJson)
      • logWarning

        protected void logWarning​(String message)
      • addUnresolvedPath

        protected void addUnresolvedPath​(String path)
      • asInt

        protected static int asInt​(Object o)
      • inputFile

        protected org.sonar.api.batch.fs.InputFile inputFile​(@Nullable
                                                             String filename)