Class ReportPage
java.lang.Object
org.jacoco.report.internal.html.page.ReportPage
- All Implemented Interfaces:
ILinkable
- Direct Known Subclasses:
NodePage, SessionsPage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final IHTMLReportContextcontext for this reportprotected final ReportOutputFolderoutput folder for this nodeprivate final ReportPage -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReportPage(ReportPage parent, ReportOutputFolder folder, IHTMLReportContext context) Creates a new report page. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidbody(HTMLElement body) private voidbreadcrumb(HTMLElement div, ReportOutputFolder base) private static voidbreadcrumbParent(ReportPage page, HTMLElement div, ReportOutputFolder base) protected abstract voidcontent(HTMLElement body) Creates the actual content of the page.private voidfooter(HTMLElement body) protected abstract StringSpecifies the local file name of this page.final StringgetLink(ReportOutputFolder base) Returns a relative link to the item that works from the given base folder.protected StringReturns the onload handler for this page.protected voidhead(HTMLElement head) Creates the elements within the head element.protected voidinfoLinks(HTMLElement span) Inserts additional links on the top right corner.protected final booleanChecks whether this is the root page of the report.voidrender()Renders this page's content and optionally additional pages.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ILinkable
getLinkLabel, getLinkStyle
-
Field Details
-
parent
-
folder
output folder for this node -
context
context for this report
-
-
Constructor Details
-
ReportPage
Creates a new report page.- Parameters:
parent- optional hierarchical parentfolder- base folder to create this report incontext- settings context
-
-
Method Details
-
isRootPage
protected final boolean isRootPage()Checks whether this is the root page of the report.- Returns:
trueif this is the root page
-
render
Renders this page's content and optionally additional pages. This method must be called at most once.- Throws:
IOException- if the page can't be written
-
head
Creates the elements within the head element.- Parameters:
head- head tag of the page- Throws:
IOException- in case of IO problems with the report writer
-
body
- Throws:
IOException
-
getOnload
-
infoLinks
Inserts additional links on the top right corner.- Parameters:
span- parent element- Throws:
IOException- in case of IO problems with the report writer
-
breadcrumb
- Throws:
IOException
-
breadcrumbParent
private static void breadcrumbParent(ReportPage page, HTMLElement div, ReportOutputFolder base) throws IOException - Throws:
IOException
-
getFileName
Specifies the local file name of this page.- Returns:
- local file name
-
content
Creates the actual content of the page.- Parameters:
body- body tag of the page- Throws:
IOException- in case of IO problems with the report writer
-
getLink
Description copied from interface:ILinkableReturns a relative link to the item that works from the given base folder.
-