Class Resources
java.lang.Object
org.jacoco.report.internal.html.resources.Resources
Static resource that are included with the coverage report and might be
referenced from created HTML pages.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReportOutputFolderstatic final StringThe name of the green part of the coverage barstatic final StringThe name of the prettify scriptstatic final StringThe name of the prettify style sheetstatic final StringThe name of the red part of the coverage barstatic final StringThe name of the sort scriptstatic final StringThe name of the style sheet -
Constructor Summary
ConstructorsConstructorDescriptionResources(ReportOutputFolder root) Attaches resources to the report with the given root folder. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcopyResource(String name) voidCopies all static resources into the report.static StringDetermines the style sheet class for the given element type.getLink(ReportOutputFolder base, String name) Returns a relative link to a static resource.
-
Field Details
-
STYLESHEET
-
PRETTIFY_STYLESHEET
-
PRETTIFY_SCRIPT
-
SORT_SCRIPT
-
REDBAR
-
GREENBAR
-
folder
-
-
Constructor Details
-
Resources
Attaches resources to the report with the given root folder.- Parameters:
root- root folder of the report
-
-
Method Details
-
getLink
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
Determines the style sheet class for the given element type.- Parameters:
type- type of the element- Returns:
- style class name
-
copyResources
Copies all static resources into the report.- Throws:
IOException- if the resources can't be written to the report
-
copyResource
- Throws:
IOException
-