Package org.jboss.as.controller.xml
Interface XMLContentWriter<C>
- Type Parameters:
C- the writer context.
- All Superinterfaces:
org.jboss.staxmapper.XMLElementWriter<C>
- All Known Subinterfaces:
XMLContent<RC,WC>
- All Known Implementing Classes:
NamedResourceRegistrationXMLElement.ResourcePropertyAttributesXMLContentWriter,ResourceRegistrationXMLElement.ResourcePropertyAttributesXMLContentWriter,ResourceXMLContainer.ResourceAttributesXMLContentWriter,XMLContent.DefaultXMLContent,XMLElement.DefaultXMLElementWriter
public interface XMLContentWriter<C>
extends org.jboss.staxmapper.XMLElementWriter<C>
Adds empty content detection to an
XMLElementWriter.- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiondefault XMLContentWriter<C>andThen(XMLContentWriter<C> after) Returns a new writer that invokesXMLElementWriter.writeContent(XMLExtendedStreamWriter, Object)on the specified writer after invokingXMLElementWriter.writeContent(XMLExtendedStreamWriter, Object)on this writer.default XMLContentWriter<C>compose(XMLContentWriter<C> before) Returns a new writer that invokesXMLElementWriter.writeContent(XMLExtendedStreamWriter, Object)on the specified writer before invokingXMLElementWriter.writeContent(XMLExtendedStreamWriter, Object)on this writer.static <RC,WC> XMLContentWriter<WC> composite(Collection<? extends XMLComponent<RC, WC>> components) static <C> XMLContentWriter<C>empty()Returns an empty content writer.booleanIndicates whether the specified content is empty.default <T> XMLContentWriter<T>Returns a new writer whose content is mapped from the specified function.Methods inherited from interface org.jboss.staxmapper.XMLElementWriter
writeContent
-
Method Details
-
isEmpty
Indicates whether the specified content is empty. -
map
Returns a new writer whose content is mapped from the specified function.- Type Parameters:
T- the mapped content type- Parameters:
mapper- a content mapping function- Returns:
- a new writer whose content is mapped from the specified function.
-
andThen
Returns a new writer that invokesXMLElementWriter.writeContent(XMLExtendedStreamWriter, Object)on the specified writer after invokingXMLElementWriter.writeContent(XMLExtendedStreamWriter, Object)on this writer.- Parameters:
writer- a content writer- Returns:
- a new content writer combining this writer with the specified writer
-
compose
Returns a new writer that invokesXMLElementWriter.writeContent(XMLExtendedStreamWriter, Object)on the specified writer before invokingXMLElementWriter.writeContent(XMLExtendedStreamWriter, Object)on this writer.- Parameters:
writer- a content writer- Returns:
- a new content writer combining this writer with the specified writer
-
empty
Returns an empty content writer.- Type Parameters:
C- the writer context.- Returns:
- an empty content writer.
-
composite
static <RC,WC> XMLContentWriter<WC> composite(Collection<? extends XMLComponent<RC, WC>> components)
-