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
public class SourceFilePage extends NodePage<ISourceNode>
Page showing the content of a source file with numbered and highlighted source lines.
-
-
Field Summary
-
Fields inherited from class org.jacoco.report.internal.html.page.ReportPage
context, folder
-
-
Constructor Summary
Constructors Constructor Description SourceFilePage(ISourceNode sourceFileNode, java.io.Reader sourceReader, int tabWidth, ReportPage parent, ReportOutputFolder folder, IHTMLReportContext context)Creates a new page with given information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcontent(HTMLElement body)Creates the actual content of the page.protected java.lang.StringgetFileName()Specifies the local file name of this page.protected java.lang.StringgetOnload()Returns the onload handler for this page.protected voidhead(HTMLElement head)Creates the elements within the head element.-
Methods inherited from class org.jacoco.report.internal.html.page.NodePage
getLinkLabel, getLinkStyle, getNode
-
Methods inherited from class org.jacoco.report.internal.html.page.ReportPage
getLink, infoLinks, isRootPage, render
-
-
-
-
Constructor Detail
-
SourceFilePage
public SourceFilePage(ISourceNode sourceFileNode, java.io.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 Detail
-
content
protected void content(HTMLElement body) throws java.io.IOException
Description copied from class:ReportPageCreates the actual content of the page.- Specified by:
contentin classReportPage- Parameters:
body- body tag of the page- Throws:
java.io.IOException- in case of IO problems with the report writer
-
head
protected void head(HTMLElement head) throws java.io.IOException
Description copied from class:ReportPageCreates the elements within the head element.- Overrides:
headin classReportPage- Parameters:
head- head tag of the page- Throws:
java.io.IOException- in case of IO problems with the report writer
-
getOnload
protected java.lang.String getOnload()
Description copied from class:ReportPageReturns the onload handler for this page.- Overrides:
getOnloadin classReportPage- Returns:
- handler or
null
-
getFileName
protected java.lang.String getFileName()
Description copied from class:ReportPageSpecifies the local file name of this page.- Specified by:
getFileNamein classReportPage- Returns:
- local file name
-
-