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 anXMLElementWriter.- Author:
- Paul Ferraro
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default 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.booleanisEmpty(C content)Indicates whether the specified content is empty.default <T> XMLContentWriter<T>map(Function<T,C> mapper)Returns a new writer whose content is mapped from the specified function.
-
-
-
Method Detail
-
isEmpty
boolean isEmpty(C content)
Indicates whether the specified content is empty.
-
map
default <T> XMLContentWriter<T> map(Function<T,C> mapper)
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
default 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.- Parameters:
writer- a content writer- Returns:
- a new content writer combining this writer with the specified writer
-
compose
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.- Parameters:
writer- a content writer- Returns:
- a new content writer combining this writer with the specified writer
-
empty
static <C> XMLContentWriter<C> 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)
-
-