Class ReportTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.jacoco.ant.ReportTask
All Implemented Interfaces:
Cloneable

public class ReportTask extends org.apache.tools.ant.Task
Task for coverage report generation.
  • Field Details

  • Constructor Details

    • ReportTask

      public ReportTask()
  • Method Details

    • createExecutiondata

      public org.apache.tools.ant.types.resources.Union createExecutiondata()
      Returns the nested resource collection for execution data files.
      Returns:
      resource collection for execution files
    • createStructure

      public ReportTask.GroupElement createStructure()
      Returns the root group element that defines the report structure.
      Returns:
      root group element
    • createHtml

      public ReportTask.HTMLFormatterElement createHtml()
      Creates a new HTML report element.
      Returns:
      HTML report element
    • createCsv

      public ReportTask.CSVFormatterElement createCsv()
      Creates a new CSV report element.
      Returns:
      CSV report element
    • createCheck

      public ReportTask.CheckFormatterElement createCheck()
      Creates a new coverage check element.
      Returns:
      coverage check element
    • createXml

      public ReportTask.XMLFormatterElement createXml()
      Creates a new XML report element.
      Returns:
      CSV report element
    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Overrides:
      execute in class org.apache.tools.ant.Task
      Throws:
      org.apache.tools.ant.BuildException
    • loadExecutionData

      private void loadExecutionData()
    • createVisitor

      private IReportVisitor createVisitor() throws IOException
      Throws:
      IOException
    • createReport

      private void createReport(IReportGroupVisitor visitor, ReportTask.GroupElement group) throws IOException
      Throws:
      IOException
    • createBundle

      private IBundleCoverage createBundle(ReportTask.GroupElement group) throws IOException
      Throws:
      IOException
    • logBundleInfo

      private void logBundleInfo(IBundleCoverage bundle, Collection<IClassCoverage> nomatch)
    • checkForMissingDebugInformation

      private void checkForMissingDebugInformation(ICoverageNode node)
    • parseLocale

      static Locale parseLocale(String locale)
      Splits a given underscore "_" separated string and creates a Locale. This method is implemented as the method Locale.forLanguageTag() was not available in Java 5.
      Parameters:
      locale - String representation of a Locate
      Returns:
      Locale instance