Module org.tquadrat.foundation.xml
Interface XMLParseEventHandler<T>
- Type Parameters:
T- The type of the target data structure.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@ClassVersion(sourceVersion="$Id: XMLParseEventHandler.java 820 2020-12-29 20:34:22Z tquadrat $")
@FunctionalInterface
@API(status=EXPERIMENTAL,
since="0.0.5")
public interface XMLParseEventHandler<T>
The interface for an implementation of a parse event handler to be used
with StAX parsing of XML files.
This is a functional interface whose functional method is
This is a functional interface whose functional method is
process(XMLEventReader, XMLEvent, Object, HandlerProvider).- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: XMLParseEventHandler.java 820 2020-12-29 20:34:22Z tquadrat $
- Since:
- 0.0.5
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.xml.parse.XMLParseEventHandler"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final XMLParseEventHandler[]An empty array ofXMLParseEventHandlerobjects. -
Method Summary
Modifier and TypeMethodDescriptionprocess(XMLEventReader reader, XMLEvent xmlEvent, T target, HandlerProvider handlerProvider) Handles the given event.
-
Field Details
-
EMPTY_XMLParseEventHandler_ARRAY
An empty array ofXMLParseEventHandlerobjects.
-
-
Method Details
-
process
T process(XMLEventReader reader, XMLEvent xmlEvent, T target, HandlerProvider handlerProvider) throws XMLStreamException Handles the given event.- Parameters:
reader- The XML event reader.xmlEvent- The current XML event.target- The instance that takes the parse result; can benullif the handler will create a new target.handlerProvider- A provider for XML parse event handlers that are needed to process child elements.- Returns:
- The instance that took the parse result; this is either the
object that was provided with the
targetargument, or a new object iftargetwasnull. - Throws:
XMLStreamException- Something went wrong.
-
