org.jacoco.report.html.resources
Class Resources

java.lang.Object
  extended by org.jacoco.report.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.

Version:
0.4.1.20101007204400
Author:
Marc R. Hoffmann

Field Summary
static String GREENBAR
          The name of the green part of the coverage bar
static String PRETTIFY_SCRIPT
          The name of the prettify script
static String PRETTIFY_STYLESHEET
          The name of the prettify style sheet
static String REDBAR
          The name of the red part of the coverage bar
static String SORT_SCRIPT
          The name of the sort script
static String STYLESHEET
          The name of the style sheet
 
Constructor Summary
Resources(ReportOutputFolder root)
          Attaches resources to the report with the given root folder.
 
Method Summary
 void copyResources()
          Copies all static resources into the report.
static String getElementStyle(ICoverageNode.ElementType type)
          Determines the style sheet class for the given element type.
 String getLink(ReportOutputFolder base, String name)
          Returns a relative link to a static resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLESHEET

public static final String STYLESHEET
The name of the style sheet

See Also:
Constant Field Values

PRETTIFY_STYLESHEET

public static final String PRETTIFY_STYLESHEET
The name of the prettify style sheet

See Also:
Constant Field Values

PRETTIFY_SCRIPT

public static final String PRETTIFY_SCRIPT
The name of the prettify script

See Also:
Constant Field Values

SORT_SCRIPT

public static final String SORT_SCRIPT
The name of the sort script

See Also:
Constant Field Values

REDBAR

public static final String REDBAR
The name of the red part of the coverage bar

See Also:
Constant Field Values

GREENBAR

public static final 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 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