Class Resources
- java.lang.Object
-
- org.jacoco.report.internal.html.resources.Resources
-
public class Resources extends java.lang.ObjectStatic 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.StringGREENBARThe name of the green part of the coverage barstatic java.lang.StringPRETTIFY_SCRIPTThe name of the prettify scriptstatic java.lang.StringPRETTIFY_STYLESHEETThe name of the prettify style sheetstatic java.lang.StringREDBARThe name of the red part of the coverage barstatic java.lang.StringSORT_SCRIPTThe name of the sort scriptstatic java.lang.StringSTYLESHEETThe name of the style sheet
-
Constructor Summary
Constructors Constructor Description Resources(ReportOutputFolder root)Attaches resources to the report with the given root folder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyResources()Copies all static resources into the report.static java.lang.StringgetElementStyle(ICoverageNode.ElementType type)Determines the style sheet class for the given element type.java.lang.StringgetLink(ReportOutputFolder base, java.lang.String name)Returns a relative link to a static resource.
-
-
-
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 createdname- 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.IOExceptionCopies all static resources into the report.- Throws:
java.io.IOException- if the resources can't be written to the report
-
-