java.lang.Object
org.jacoco.report.internal.html.resources.Resources

public class Resources extends Object
Static resource that are included with the coverage report and might be referenced from created HTML pages.
  • Field Details

  • Constructor Details

    • Resources

      public Resources(ReportOutputFolder root)
      Attaches resources to the report with the given root folder.
      Parameters:
      root - root folder of the report
  • Method Details

    • getLink

      public String getLink(ReportOutputFolder base, String name)
      Returns a relative link to a static resource.
      Parameters:
      base - base folder from where the link should be created
      name - name of the static resource, see constants in this class
      Returns:
      relative link
    • getElementStyle

      public static String getElementStyle(ICoverageNode.ElementType type)
      Determines the style sheet class for the given element type.
      Parameters:
      type - type of the element
      Returns:
      style class name
    • copyResources

      public void copyResources() throws IOException
      Copies all static resources into the report.
      Throws:
      IOException - if the resources can't be written to the report
    • copyResource

      private void copyResource(String name) throws IOException
      Throws:
      IOException