Interface DocumentWriter<T extends Element<T>>
- Type Parameters:
T
- root element type
- All Superinterfaces:
Appendable<T>
,AutoCloseable
,Closeable
Writer for documents with a certain root element type.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <R extends Element<R>>
DocumentWriter<R> create
(org.opentest4j.reporting.schema.QualifiedName rootElementName, NamespaceRegistry namespaceRegistry, Path xmlFile) Create a new document writer with the supplied root element name and namespace registry that will write to the supplied XML file.static <T extends Element<T>>
DocumentWriter<T> noop()
Create a no-op implementation ofDocumentWriter
.Methods inherited from interface org.opentest4j.reporting.events.api.Appendable
append, append
-
Method Details
-
noop
Create a no-op implementation ofDocumentWriter
.- Type Parameters:
T
- root element type- Returns:
- no-op DocumentWriter
-
create
static <R extends Element<R>> DocumentWriter<R> create(org.opentest4j.reporting.schema.QualifiedName rootElementName, NamespaceRegistry namespaceRegistry, Path xmlFile) throws Exception Create a new document writer with the supplied root element name and namespace registry that will write to the supplied XML file.- Type Parameters:
R
- root element type- Parameters:
rootElementName
- root element namenamespaceRegistry
- namespace registryxmlFile
- target XML file- Returns:
- new document writer
- Throws:
Exception
- in case there's an error opening the XML file or preparing the XML writing infrastructure
-