Klasse CoverageParser

java.lang.Object
io.jenkins.plugins.coverage.adapter.parser.CoverageParser
Bekannte direkte Unterklassen:
IstanbulCoberturaReportAdapter.IstanbulCoberturaCoverageParser, JavaCoverageParser

public abstract class CoverageParser extends Object
Parse the standard format coverage report and convert it into CoverageResult.
  • Konstruktordetails

    • CoverageParser

      public CoverageParser(String reportName)
      Report name will show in the UI, to differentiate different report.
      Parameter:
      reportName - name of the report
  • Methodendetails

    • parse

      public CoverageResult parse(Document document) throws CoverageException
      Parse coverage report Document to CoverageResult.
      Parameter:
      document - DOM document of coverage report
      Gibt zurück:
      Coverage result of specified report
      Löst aus:
      CoverageException
    • parse

      public void parse(Node parent, CoverageResult parentResult)
      Iterate the child elements of parent node, and parse the element to CoverageResult, then make the CoverageResult. be the child of parent CoverageResult.
      Parameter:
      parent - parent Node
      parentResult - parent coverage result
    • processElement

      @CheckForNull protected abstract CoverageResult processElement(Element current, CoverageResult parentResult)
      Process DOM Element and convert it to CoverageResult.
      Parameter:
      current - current element
      parentResult - parent coverage result
      Gibt zurück:
      coverage result converted from Element
    • getReportName

      public String getReportName()
      Getter for property 'reportName'.
      Gibt zurück:
      value for property 'reportName'
    • setReportName

      public void setReportName(String reportName)
      Setter for property 'reportName'.
      Parameter:
      reportName - value to set for property 'reportName'
    • getAttribute

      protected String getAttribute(Element e, String attributeName, String defaultValue)
    • getAttribute

      protected String getAttribute(Element e, String attributeName)
      Parameter:
      e - element
      attributeName - attribute name
      Gibt zurück:
      value of attribute, or null if attribute not exists.
    • processLine

      protected void processLine(Element current, CoverageResult parentResult)