org.jacoco.report.html
Class HTMLFormatter

java.lang.Object
  extended by org.jacoco.report.html.HTMLFormatter
All Implemented Interfaces:
org.jacoco.report.internal.html.IHTMLReportContext

public class HTMLFormatter
extends Object
implements org.jacoco.report.internal.html.IHTMLReportContext

Formatter for coverage reports in multiple HTML pages.


Constructor Summary
HTMLFormatter()
          New instance with default settings.
 
Method Summary
 IReportVisitor createVisitor(IMultiReportOutput output)
          Creates a new visitor to write a report to the given output.
 String getFooterText()
          Returns a string of textual information to include in every page footer.
 org.jacoco.report.internal.html.index.IIndexUpdate getIndexUpdate()
          Returns the service for index updates.
 ILanguageNames getLanguageNames()
          Returns the language names call-back used in this report.
 Locale getLocale()
          Returns the locale used to format numbers and dates.
 String getOutputEncoding()
          Returns the encoding of the generated HTML documents.
 org.jacoco.report.internal.html.resources.Resources getResources()
          Returns the static resources used in this report.
 org.jacoco.report.internal.html.ILinkable getSessionsPage()
          Returns the link to the sessions page.
 org.jacoco.report.internal.html.table.Table getTable()
          Returns a table for rendering coverage nodes.
 void setFooterText(String footerText)
          Sets the optional text that should be included in every footer page.
 void setLanguageNames(ILanguageNames languageNames)
          Sets the implementation for language name display.
 void setLocale(Locale locale)
          Sets the locale used for report rendering.
 void setOutputEncoding(String outputEncoding)
          Sets the encoding used for generated HTML pages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLFormatter

public HTMLFormatter()
New instance with default settings.

Method Detail

setLanguageNames

public void setLanguageNames(ILanguageNames languageNames)
Sets the implementation for language name display. Java language names are defined by default.

Parameters:
languageNames - converter for language specific names

setLocale

public void setLocale(Locale locale)
Sets the locale used for report rendering. The current default locale is used by default.

Parameters:
locale - locale used for report rendering

setFooterText

public void setFooterText(String footerText)
Sets the optional text that should be included in every footer page.

Parameters:
footerText - footer text

setOutputEncoding

public void setOutputEncoding(String outputEncoding)
Sets the encoding used for generated HTML pages. Default is UTF-8.

Parameters:
outputEncoding - HTML output encoding

getLanguageNames

public ILanguageNames getLanguageNames()
Description copied from interface: org.jacoco.report.internal.html.IHTMLReportContext
Returns the language names call-back used in this report.

Specified by:
getLanguageNames in interface org.jacoco.report.internal.html.IHTMLReportContext
Returns:
language names

getResources

public org.jacoco.report.internal.html.resources.Resources getResources()
Description copied from interface: org.jacoco.report.internal.html.IHTMLReportContext
Returns the static resources used in this report.

Specified by:
getResources in interface org.jacoco.report.internal.html.IHTMLReportContext
Returns:
static resources

getTable

public org.jacoco.report.internal.html.table.Table getTable()
Description copied from interface: org.jacoco.report.internal.html.IHTMLReportContext
Returns a table for rendering coverage nodes.

Specified by:
getTable in interface org.jacoco.report.internal.html.IHTMLReportContext
Returns:
table for rendering

getFooterText

public String getFooterText()
Description copied from interface: org.jacoco.report.internal.html.IHTMLReportContext
Returns a string of textual information to include in every page footer.

Specified by:
getFooterText in interface org.jacoco.report.internal.html.IHTMLReportContext
Returns:
footer text or empty string

getSessionsPage

public org.jacoco.report.internal.html.ILinkable getSessionsPage()
Description copied from interface: org.jacoco.report.internal.html.IHTMLReportContext
Returns the link to the sessions page.

Specified by:
getSessionsPage in interface org.jacoco.report.internal.html.IHTMLReportContext
Returns:
sessions page link

getOutputEncoding

public String getOutputEncoding()
Description copied from interface: org.jacoco.report.internal.html.IHTMLReportContext
Returns the encoding of the generated HTML documents.

Specified by:
getOutputEncoding in interface org.jacoco.report.internal.html.IHTMLReportContext
Returns:
encoding for generated HTML documents

getIndexUpdate

public org.jacoco.report.internal.html.index.IIndexUpdate getIndexUpdate()
Description copied from interface: org.jacoco.report.internal.html.IHTMLReportContext
Returns the service for index updates.

Specified by:
getIndexUpdate in interface org.jacoco.report.internal.html.IHTMLReportContext
Returns:
sevice for indes updates

getLocale

public Locale getLocale()
Description copied from interface: org.jacoco.report.internal.html.IHTMLReportContext
Returns the locale used to format numbers and dates.

Specified by:
getLocale in interface org.jacoco.report.internal.html.IHTMLReportContext
Returns:
locale for numbers and dates

createVisitor

public IReportVisitor createVisitor(IMultiReportOutput output)
                             throws IOException
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