Package org.codehaus.stax2.ri.evt
Class Stax2EventAllocatorImpl
- java.lang.Object
-
- org.codehaus.stax2.ri.evt.Stax2EventAllocatorImpl
-
- All Implemented Interfaces:
javax.xml.stream.util.XMLEventAllocator
,javax.xml.stream.XMLStreamConstants
public class Stax2EventAllocatorImpl extends java.lang.Object implements javax.xml.stream.util.XMLEventAllocator, javax.xml.stream.XMLStreamConstants
Base implementation ofXMLEventAllocator
, to be used either as is, or as a base for more specialized Stax2 event allocator implementation.
-
-
Constructor Summary
Constructors Constructor Description Stax2EventAllocatorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.xml.stream.events.XMLEvent
allocate(javax.xml.stream.XMLStreamReader r)
void
allocate(javax.xml.stream.XMLStreamReader r, javax.xml.stream.util.XMLEventConsumer consumer)
protected javax.xml.stream.events.DTD
createDTD(javax.xml.stream.XMLStreamReader r, javax.xml.stream.Location loc)
protected javax.xml.stream.events.EntityReference
createEntityReference(javax.xml.stream.XMLStreamReader r, javax.xml.stream.Location loc)
protected javax.xml.stream.events.StartElement
createStartElement(javax.xml.stream.XMLStreamReader r, javax.xml.stream.Location loc)
protected javax.xml.stream.Location
getLocation(javax.xml.stream.XMLStreamReader r)
Method used to get theLocation
object to use for an event to create.javax.xml.stream.util.XMLEventAllocator
newInstance()
-
-
-
Method Detail
-
allocate
public javax.xml.stream.events.XMLEvent allocate(javax.xml.stream.XMLStreamReader r) throws javax.xml.stream.XMLStreamException
- Specified by:
allocate
in interfacejavax.xml.stream.util.XMLEventAllocator
- Throws:
javax.xml.stream.XMLStreamException
-
allocate
public void allocate(javax.xml.stream.XMLStreamReader r, javax.xml.stream.util.XMLEventConsumer consumer) throws javax.xml.stream.XMLStreamException
- Specified by:
allocate
in interfacejavax.xml.stream.util.XMLEventAllocator
- Throws:
javax.xml.stream.XMLStreamException
-
newInstance
public javax.xml.stream.util.XMLEventAllocator newInstance()
- Specified by:
newInstance
in interfacejavax.xml.stream.util.XMLEventAllocator
-
getLocation
protected javax.xml.stream.Location getLocation(javax.xml.stream.XMLStreamReader r)
Method used to get theLocation
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).
-
createEntityReference
protected javax.xml.stream.events.EntityReference createEntityReference(javax.xml.stream.XMLStreamReader r, javax.xml.stream.Location loc) throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
createDTD
protected javax.xml.stream.events.DTD createDTD(javax.xml.stream.XMLStreamReader r, javax.xml.stream.Location loc) throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
createStartElement
protected javax.xml.stream.events.StartElement createStartElement(javax.xml.stream.XMLStreamReader r, javax.xml.stream.Location loc) throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
-