Class HTMLFormatter
java.lang.Object
org.jacoco.report.html.HTMLFormatter
- All Implemented Interfaces:
IHTMLReportContext
Formatter for coverage reports in multiple HTML pages.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate ElementIndexprivate ILanguageNamesprivate Localeprivate Stringprivate Resourcesprivate SessionsPageprivate Table -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddMissedTotalColumns(Table table, String label, ICoverageNode.CounterEntity entity) private TablecreateVisitor(IMultiReportOutput output) Creates a new visitor to write a report to the given output.Returns a string of textual information to include in every page footer.Returns the service for index updates.Returns the language names call-back used in this report.Returns the locale used to format numbers and dates.Returns the encoding of the generated HTML documents.Returns the static resources used in this report.Returns the link to the sessions page.getTable()Returns a table for rendering coverage nodes.voidsetFooterText(String footerText) Sets the optional text that should be included in every footer page.voidsetLanguageNames(ILanguageNames languageNames) Sets the implementation for language name display.voidSets the locale used for report rendering.voidsetOutputEncoding(String outputEncoding) Sets the encoding used for generated HTML pages.
-
Field Details
-
languageNames
-
locale
-
outputEncoding
-
resources
-
index
-
sessionsPage
-
table
-
-
Constructor Details
-
HTMLFormatter
public HTMLFormatter()New instance with default settings.
-
-
Method Details
-
setLanguageNames
Sets the implementation for language name display. Java language names are defined by default.- Parameters:
languageNames- converter for language specific names
-
setLocale
Sets the locale used for report rendering. The current default locale is used by default.- Parameters:
locale- locale used for report rendering
-
setOutputEncoding
Sets the encoding used for generated HTML pages. Default is UTF-8.- Parameters:
outputEncoding- HTML output encoding
-
getLanguageNames
Description copied from interface:IHTMLReportContextReturns the language names call-back used in this report.- Specified by:
getLanguageNamesin interfaceIHTMLReportContext- Returns:
- language names
-
getResources
Description copied from interface:IHTMLReportContextReturns the static resources used in this report.- Specified by:
getResourcesin interfaceIHTMLReportContext- Returns:
- static resources
-
getTable
Description copied from interface:IHTMLReportContextReturns a table for rendering coverage nodes.- Specified by:
getTablein interfaceIHTMLReportContext- Returns:
- table for rendering
-
createTable
-
addMissedTotalColumns
-
getSessionsPage
Description copied from interface:IHTMLReportContextReturns the link to the sessions page.- Specified by:
getSessionsPagein interfaceIHTMLReportContext- Returns:
- sessions page link
-
getOutputEncoding
Description copied from interface:IHTMLReportContextReturns the encoding of the generated HTML documents.- Specified by:
getOutputEncodingin interfaceIHTMLReportContext- Returns:
- encoding for generated HTML documents
-
getIndexUpdate
Description copied from interface:IHTMLReportContextReturns the service for index updates.- Specified by:
getIndexUpdatein interfaceIHTMLReportContext- Returns:
- sevice for indes updates
-
getLocale
Description copied from interface:IHTMLReportContextReturns the locale used to format numbers and dates.- Specified by:
getLocalein interfaceIHTMLReportContext- Returns:
- locale for numbers and dates
-
createVisitor
Creates a new visitor to write a report to the given output.- Parameters:
output- output to write the report to- Returns:
- visitor to emit the report data to
- Throws:
IOException- in case of problems with the output stream
-