Class Resources


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

      Fields 
      Modifier and Type Field Description
      static java.lang.String GREENBAR
      The name of the green part of the coverage bar
      static java.lang.String PRETTIFY_SCRIPT
      The name of the prettify script
      static java.lang.String PRETTIFY_STYLESHEET
      The name of the prettify style sheet
      static java.lang.String REDBAR
      The name of the red part of the coverage bar
      static java.lang.String SORT_SCRIPT
      The name of the sort script
      static java.lang.String STYLESHEET
      The name of the style sheet
    • Constructor Summary

      Constructors 
      Constructor Description
      Resources​(ReportOutputFolder root)
      Attaches resources to the report with the given root folder.
    • Field Detail

      • STYLESHEET

        public static final java.lang.String STYLESHEET
        The name of the style sheet
        See Also:
        Constant Field Values
      • PRETTIFY_STYLESHEET

        public static final java.lang.String PRETTIFY_STYLESHEET
        The name of the prettify style sheet
        See Also:
        Constant Field Values
      • PRETTIFY_SCRIPT

        public static final java.lang.String PRETTIFY_SCRIPT
        The name of the prettify script
        See Also:
        Constant Field Values
      • SORT_SCRIPT

        public static final java.lang.String SORT_SCRIPT
        The name of the sort script
        See Also:
        Constant Field Values
      • REDBAR

        public static final java.lang.String REDBAR
        The name of the red part of the coverage bar
        See Also:
        Constant Field Values
      • GREENBAR

        public static final java.lang.String GREENBAR
        The name of the green part of the coverage bar
        See Also:
        Constant Field Values
    • Constructor Detail

      • Resources

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

      • getLink

        public java.lang.String getLink​(ReportOutputFolder base,
                                        java.lang.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 java.lang.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 java.io.IOException
        Copies all static resources into the report.
        Throws:
        java.io.IOException - if the resources can't be written to the report