Package org.jboss.as.controller.xml
Interface XMLContent<RC,WC>
- Type Parameters:
RC- the reader contextWC- the writer content
- All Superinterfaces:
XMLContentWriter<WC>,org.jboss.staxmapper.XMLElementWriter<WC>
- All Known Implementing Classes:
XMLContent.DefaultXMLContent
Encapsulates the content of an XML element.
- Author:
- Paul Ferraro
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <RC,WC> XMLContent<RC, WC> empty()Returns an empty contentstatic <RC,WC> XMLContent<RC, WC> of(BiConsumer<RC, String> consumer) Returns XML content whose text is consumed by the specified consumer during parsing.static <RC,WC> XMLContent<RC, WC> of(BiConsumer<RC, String> consumer, Function<WC, String> formatter) Returns XML content whose text is consumed by the specified consumer during parsing and formatted using the specified function during marshalling.static <RC,WC> XMLContent<RC, WC> of(XMLElementGroup<RC, WC> group) Returns an empty contentvoidreadContent(org.jboss.staxmapper.XMLExtendedStreamReader reader, RC context) Reads element content into the specified reader context.Methods inherited from interface org.jboss.as.controller.xml.XMLContentWriter
andThen, compose, isEmpty, mapMethods inherited from interface org.jboss.staxmapper.XMLElementWriter
writeContent
-
Method Details
-
readContent
void readContent(org.jboss.staxmapper.XMLExtendedStreamReader reader, RC context) throws XMLStreamException Reads element content into the specified reader context.- Parameters:
reader- a StaX readercontext- the reader context- Throws:
XMLStreamException- if the input could not be read from the specified reader.
-
empty
Returns an empty content- Type Parameters:
RC- the reader contextWC- the writer context- Returns:
- an empty content
-
of
Returns XML content whose text is consumed by the specified consumer during parsing.- Type Parameters:
RC- the read context typeRC- the write context type- Parameters:
consumer- a consumer of text content- Returns:
- XML content whose text is consumed by the specified consumer.
-
of
Returns XML content whose text is consumed by the specified consumer during parsing and formatted using the specified function during marshalling.- Type Parameters:
RC- the read context typeRC- the write context type- Parameters:
consumer- a consumer of text contentformatter- a formatter of text content- Returns:
- XML content whose text is consumed by the specified consumer.
-
of
Returns an empty content- Type Parameters:
RC- the reader contextWC- the writer context- Returns:
- an empty content
-