Class SourceFilePage
java.lang.Object
org.jacoco.report.internal.html.page.ReportPage
org.jacoco.report.internal.html.page.NodePage<ISourceNode>
org.jacoco.report.internal.html.page.SourceFilePage
- All Implemented Interfaces:
ILinkable, ITableItem
Page showing the content of a source file with numbered and highlighted
source lines.
-
Field Summary
FieldsFields inherited from class ReportPage
context, folder -
Constructor Summary
ConstructorsConstructorDescriptionSourceFilePage(ISourceNode sourceFileNode, Reader sourceReader, int tabWidth, ReportPage parent, ReportOutputFolder folder, IHTMLReportContext context) Creates a new page with given information. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcontent(HTMLElement body) Creates the actual content of the page.protected StringSpecifies the local file name of this page.protected StringReturns the onload handler for this page.protected voidhead(HTMLElement head) Creates the elements within the head element.Methods inherited from class NodePage
getLinkLabel, getLinkStyle, getNodeMethods inherited from class ReportPage
getLink, infoLinks, isRootPage, render
-
Field Details
-
sourceReader
-
tabWidth
private final int tabWidth
-
-
Constructor Details
-
SourceFilePage
public SourceFilePage(ISourceNode sourceFileNode, Reader sourceReader, int tabWidth, ReportPage parent, ReportOutputFolder folder, IHTMLReportContext context) Creates a new page with given information.- Parameters:
sourceFileNode- coverage data for this source filesourceReader- reader for the source codetabWidth- number of character per tabparent- optional hierarchical parentfolder- base folder for this pagecontext- settings context
-
-
Method Details
-
content
Description copied from class:ReportPageCreates the actual content of the page.- Specified by:
contentin classReportPage- Parameters:
body- body tag of the page- Throws:
IOException- in case of IO problems with the report writer
-
head
Description copied from class:ReportPageCreates the elements within the head element.- Overrides:
headin classReportPage- Parameters:
head- head tag of the page- Throws:
IOException- in case of IO problems with the report writer
-
getOnload
Description copied from class:ReportPageReturns the onload handler for this page.- Overrides:
getOnloadin classReportPage- Returns:
- handler or
null
-
getFileName
Description copied from class:ReportPageSpecifies the local file name of this page.- Specified by:
getFileNamein classReportPage- Returns:
- local file name
-