public abstract class AbstractXMLEvent extends Object implements ExtendedXMLEvent, Serializable, Cloneable
XMLEvent implementations.| Modifier and Type | Field and Description |
|---|---|
protected Location |
location
The event location.
|
protected QName |
schemaType
The schema type.
|
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 |
|---|
AbstractXMLEvent() |
AbstractXMLEvent(Location location) |
AbstractXMLEvent(Location location,
QName schemaType) |
AbstractXMLEvent(XMLEvent that) |
| Modifier and Type | Method and Description |
|---|---|
Characters |
asCharacters() |
EndElement |
asEndElement() |
StartElement |
asStartElement() |
Object |
clone() |
Location |
getLocation() |
QName |
getSchemaType() |
boolean |
isAttribute() |
boolean |
isCharacters() |
boolean |
isEndDocument() |
boolean |
isEndElement() |
boolean |
isEntityReference() |
boolean |
isNamespace() |
boolean |
isProcessingInstruction() |
boolean |
isStartDocument() |
boolean |
isStartElement() |
boolean |
matches(XMLEvent event)
Determines if this event matches another event, irrespective of document
location.
|
String |
toString() |
void |
writeAsEncodedUnicode(Writer writer) |
void |
writeEvent(XMLStreamWriter writer)
Writes the event to the provided
XMLStreamWriter. |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEventTypeprotected Location location
protected QName schemaType
public AbstractXMLEvent()
public AbstractXMLEvent(Location location)
public AbstractXMLEvent(XMLEvent that)
public Location getLocation()
getLocation in interface XMLEventpublic QName getSchemaType()
getSchemaType in interface XMLEventpublic Characters asCharacters()
asCharacters in interface XMLEventpublic EndElement asEndElement()
asEndElement in interface XMLEventpublic StartElement asStartElement()
asStartElement in interface XMLEventpublic boolean isAttribute()
isAttribute in interface XMLEventpublic boolean isCharacters()
isCharacters in interface XMLEventpublic boolean isEndDocument()
isEndDocument in interface XMLEventpublic boolean isEndElement()
isEndElement in interface XMLEventpublic boolean isEntityReference()
isEntityReference in interface XMLEventpublic boolean isNamespace()
isNamespace in interface XMLEventpublic boolean isProcessingInstruction()
isProcessingInstruction in interface XMLEventpublic boolean isStartDocument()
isStartDocument in interface XMLEventpublic boolean isStartElement()
isStartElement in interface XMLEventpublic boolean matches(XMLEvent event)
ExtendedXMLEventmatches in interface ExtendedXMLEventevent - The event to match against.true if the two events match, false
otherwise.public void writeEvent(XMLStreamWriter writer) throws XMLStreamException
ExtendedXMLEventXMLStreamWriter.writeEvent in interface ExtendedXMLEventwriter - The destination stream.XMLStreamException - If an error occurs writing to the destination stream.public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException
writeAsEncodedUnicode in interface XMLEventXMLStreamExceptionCopyright © 2020. All rights reserved.