Class Element<T extends Element<T>>
java.lang.Object
org.opentest4j.reporting.events.api.Element<T>
- Type Parameters:
T
- element type
- All Implemented Interfaces:
Appendable<T>
- Direct Known Subclasses:
ChildElement
,Events
Base class for elements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<C extends ChildElement<T,
? super C>>
Appendable<T> toString()
withAttribute
(org.opentest4j.reporting.schema.QualifiedName qualifiedName, String value) Add an attribute to this element.withCDataSection
(String value) Add a CDATA section to this element.withContent
(String value) Add text content to this element.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opentest4j.reporting.events.api.Appendable
append
-
Constructor Details
-
Element
Create an instance with the supplied context and qualified name.- Parameters:
context
- the context of this instancequalifiedName
- the qualified name of this instance
-
-
Method Details
-
withContent
Add text content to this element.- Parameters:
value
- the text content- Returns:
- this element
-
withCDataSection
Add a CDATA section to this element.- Parameters:
value
- the content of the CDATA section- Returns:
- this element
-
withAttribute
public Element<T> withAttribute(org.opentest4j.reporting.schema.QualifiedName qualifiedName, String value) Add an attribute to this element.- Parameters:
qualifiedName
- the qualified name of the attributevalue
- the attribute value- Returns:
- this element
-
append
public <C extends ChildElement<T,? super C>> Appendable<T> append(Factory<C> creator, Consumer<? super C> configurer) Description copied from interface:Appendable
- Specified by:
append
in interfaceAppendable<T extends Element<T>>
- Type Parameters:
C
- child element type- Parameters:
creator
- child element factoryconfigurer
- child element configurer- Returns:
- self reference to allow method chaining
-
toString
-