public class Stax2EventAllocatorImpl extends Object implements XMLEventAllocator, XMLStreamConstants
XMLEventAllocator
, to be
used either as is, or as a base for more specialized Stax2
event allocator implementation.ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
Constructor and Description |
---|
Stax2EventAllocatorImpl() |
Modifier and Type | Method and Description |
---|---|
XMLEvent |
allocate(XMLStreamReader r) |
void |
allocate(XMLStreamReader r,
XMLEventConsumer consumer) |
protected DTD |
createDTD(XMLStreamReader r,
Location loc) |
protected EntityReference |
createEntityReference(XMLStreamReader r,
Location loc) |
protected StartElement |
createStartElement(XMLStreamReader r,
Location loc) |
protected Location |
getLocation(XMLStreamReader r)
Method used to get the
Location object to use for
an event to create. |
XMLEventAllocator |
newInstance() |
public XMLEvent allocate(XMLStreamReader r) throws XMLStreamException
allocate
in interface XMLEventAllocator
XMLStreamException
public void allocate(XMLStreamReader r, XMLEventConsumer consumer) throws XMLStreamException
allocate
in interface XMLEventAllocator
XMLStreamException
public XMLEventAllocator newInstance()
newInstance
in interface XMLEventAllocator
protected Location getLocation(XMLStreamReader r)
Location
object to use for
an event to create. Base implementation just calls stream
reader's accessors, but sub-classes may choose to use other
methods (esp. when not in "preserve location" mode).protected EntityReference createEntityReference(XMLStreamReader r, Location loc) throws XMLStreamException
XMLStreamException
protected DTD createDTD(XMLStreamReader r, Location loc) throws XMLStreamException
XMLStreamException
protected StartElement createStartElement(XMLStreamReader r, Location loc) throws XMLStreamException
XMLStreamException
Copyright © 2015 fasterxml.com. All Rights Reserved.