Class HTMLElement
java.lang.Object
org.jacoco.report.internal.xml.XMLElement
org.jacoco.report.internal.html.HTMLElement
A
XMLElement with utility methods to create XHTML documents. It
provides methods of HTML tags to avoid magic strings in the generators.-
Field Summary
FieldsFields inherited from class XMLElement
writer -
Constructor Summary
ConstructorsModifierConstructorDescriptionHTMLElement(OutputStream output, String encoding) Creates ahtmlroot element of a XHTML document.privateHTMLElement(String name, HTMLElement parent) -
Method Summary
Modifier and TypeMethodDescriptionCreates a 'a' element.Creates a 'a' element.a(ILinkable linkable, ReportOutputFolder base) Creates a link to the givenILinkable.body()Creates a 'body' element.private voidcode()Creates a 'code' element.Creates a 'div' element.Creates a new child element for this element.h1()Creates a 'h1' element.head()Creates a 'head' element.voidCreates a 'img' element.Creates a 'link' element.Creates a 'meta' element.p()Creates a 'p' element.Creates a 'pre' element.voidCreates a JavaScript 'script' element.span()Creates a 'span' element.Creates a 'span' element.Creates a 'span' element.Creates a 'table' element.tbody()Creates a 'tbody' element.td()Creates a 'td' element.Creates a 'td' element.tfoot()Creates a 'tfoot' element.thead()Creates a 'thead' element.title()Creates a 'title' element.tr()Creates a 'tr' element.
-
Field Details
-
PUBID
- See Also:
-
SYSTEM
- See Also:
-
-
Constructor Details
-
HTMLElement
Creates ahtmlroot element of a XHTML document.- Parameters:
output- output stream will be closed if the root element is closedencoding- character encoding used for output- Throws:
IOException- in case of problems with the underlying output
-
HTMLElement
- Throws:
IOException
-
-
Method Details
-
element
Description copied from class:XMLElementCreates a new child element for this element. Might be overridden in subclasses to return a instance of the subclass.- Overrides:
elementin classXMLElement- Parameters:
name- name of the child element- Returns:
- child element instance
- Throws:
IOException- in case of problems with the underlying output
-
classattr
- Throws:
IOException
-
head
Creates a 'head' element.- Returns:
- 'head' element
- Throws:
IOException- in case of problems with the underlying output
-
body
Creates a 'body' element.- Returns:
- 'body' element
- Throws:
IOException- in case of problems with the underlying output
-
meta
Creates a 'meta' element.- Parameters:
httpequivattr- value of the http-equiv attributecontentattr- value for the content attribute- Returns:
- 'meta' element
- Throws:
IOException- in case of problems with the underlying output
-
link
Creates a 'link' element.- Parameters:
relattr- value of the rel attributehrefattr- value for the href attributetypeattr- value for the type attribute- Returns:
- 'link' element
- Throws:
IOException- in case of problems with the underlying output
-
title
Creates a 'title' element.- Returns:
- 'title' element
- Throws:
IOException- in case of problems with the underlying output
-
h1
Creates a 'h1' element.- Returns:
- 'h1' element
- Throws:
IOException- in case of problems with the underlying output
-
p
Creates a 'p' element.- Returns:
- 'p' element
- Throws:
IOException- in case of problems with the underlying output
-
span
Creates a 'span' element.- Returns:
- 'span' element
- Throws:
IOException- in case of problems with the underlying output
-
span
Creates a 'span' element.- Parameters:
classattr- value of the class attribute- Returns:
- 'span' element
- Throws:
IOException- in case of problems with the underlying output
-
span
Creates a 'span' element.- Parameters:
classattr- value of the class attributeidattr- value of the id attribute- Returns:
- 'span' element
- Throws:
IOException- in case of problems with the underlying output
-
div
Creates a 'div' element.- Parameters:
classattr- value of the class attribute- Returns:
- 'div' element
- Throws:
IOException- in case of problems with the underlying output
-
code
Creates a 'code' element.- Returns:
- 'code' element
- Throws:
IOException- in case of problems with the underlying output
-
pre
Creates a 'pre' element.- Parameters:
classattr- value of the class attribute- Returns:
- 'pre' element
- Throws:
IOException- in case of problems with the underlying output
-
a
Creates a 'a' element.- Parameters:
hrefattr- value of the href attribute- Returns:
- 'a' element
- Throws:
IOException- in case of problems with the underlying output
-
a
Creates a 'a' element.- Parameters:
hrefattr- value of the href attributeclassattr- value of the class attribute- Returns:
- 'a' element
- Throws:
IOException- in case of problems with the underlying output
-
a
Creates a link to the givenILinkable.- Parameters:
linkable- object to link tobase- base folder where the link should be placed- Returns:
- 'a' element or 'span' element, if the link target does not exist
- Throws:
IOException- in case of problems with the underlying output
-
table
Creates a 'table' element.- Parameters:
classattr- value of the class attribute- Returns:
- 'table' element
- Throws:
IOException- in case of problems with the underlying output
-
thead
Creates a 'thead' element.- Returns:
- 'thead' element
- Throws:
IOException- in case of problems with the underlying output
-
tfoot
Creates a 'tfoot' element.- Returns:
- 'tfoot' element
- Throws:
IOException- in case of problems with the underlying output
-
tbody
Creates a 'tbody' element.- Returns:
- 'tbody' element
- Throws:
IOException- in case of problems with the underlying output
-
tr
Creates a 'tr' element.- Returns:
- 'tr' element
- Throws:
IOException- in case of problems with the underlying output
-
td
Creates a 'td' element.- Returns:
- 'td' element
- Throws:
IOException- in case of problems with the underlying output
-
td
Creates a 'td' element.- Parameters:
classattr- value of the class attribute- Returns:
- 'td' element
- Throws:
IOException- in case of problems with the underlying output
-
img
Creates a 'img' element.- Parameters:
srcattr- value of the src attributewidthattr- value of the width attributeheightattr- value of the height attributetitleattr- value of the title and alt attribute- Throws:
IOException- in case of problems with the underlying output
-
script
Creates a JavaScript 'script' element.- Parameters:
srcattr- value of the src attribute- Throws:
IOException- in case of problems with the underlying output
-