Package org.codehaus.stax2.ri.evt
Class BaseEventImpl
java.lang.Object
org.codehaus.stax2.ri.evt.BaseEventImpl
- All Implemented Interfaces:
XMLEvent
,XMLStreamConstants
,XMLEvent2
- Direct Known Subclasses:
AttributeEventImpl
,CharactersEventImpl
,CommentEventImpl
,DTDEventImpl
,EndDocumentEventImpl
,EndElementEventImpl
,EntityDeclarationEventImpl
,EntityReferenceEventImpl
,NotationDeclarationEventImpl
,ProcInstrEventImpl
,StartDocumentEventImpl
,StartElementEventImpl
This abstract base class implements common functionality for
Stax2 reference implementation's event API part.
-
Field Summary
FieldsFields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static int
abstract boolean
Declared abstract to force redefinition by sub-classesabstract int
abstract int
hashCode()
Declared abstract to force redefinition by sub-classesboolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
protected static boolean
iteratedEquals
(Iterator<?> it1, Iterator<?> it2) protected static boolean
stringsWithNullsEqual
(String s1, String s2) Comparison method that will consider null Strings to be equivalent to empty Strings for comparison purposes; and compare equality with that caveat.protected void
throwFromIOE
(IOException ioe) toString()
abstract void
abstract void
-
Field Details
-
mLocation
Deprecated.CallgetLocation()
instead.Location where token started; exact definition may depends on event type.TODO: remove direct dependencies to this by sub-classes; rename
-
-
Constructor Details
-
BaseEventImpl
-
-
Method Details
-
asCharacters
- Specified by:
asCharacters
in interfaceXMLEvent
-
asEndElement
- Specified by:
asEndElement
in interfaceXMLEvent
-
asStartElement
- Specified by:
asStartElement
in interfaceXMLEvent
-
getEventType
public abstract int getEventType()- Specified by:
getEventType
in interfaceXMLEvent
-
getLocation
- Specified by:
getLocation
in interfaceXMLEvent
-
getSchemaType
- Specified by:
getSchemaType
in interfaceXMLEvent
-
isAttribute
public boolean isAttribute()- Specified by:
isAttribute
in interfaceXMLEvent
-
isCharacters
public boolean isCharacters()- Specified by:
isCharacters
in interfaceXMLEvent
-
isEndDocument
public boolean isEndDocument()- Specified by:
isEndDocument
in interfaceXMLEvent
-
isEndElement
public boolean isEndElement()- Specified by:
isEndElement
in interfaceXMLEvent
-
isEntityReference
public boolean isEntityReference()- Specified by:
isEntityReference
in interfaceXMLEvent
-
isNamespace
public boolean isNamespace()- Specified by:
isNamespace
in interfaceXMLEvent
-
isProcessingInstruction
public boolean isProcessingInstruction()- Specified by:
isProcessingInstruction
in interfaceXMLEvent
-
isStartDocument
public boolean isStartDocument()- Specified by:
isStartDocument
in interfaceXMLEvent
-
isStartElement
public boolean isStartElement()- Specified by:
isStartElement
in interfaceXMLEvent
-
writeAsEncodedUnicode
- Specified by:
writeAsEncodedUnicode
in interfaceXMLEvent
- Throws:
XMLStreamException
-
writeUsing
- Specified by:
writeUsing
in interfaceXMLEvent2
- Throws:
XMLStreamException
-
equals
Declared abstract to force redefinition by sub-classes -
hashCode
public abstract int hashCode()Declared abstract to force redefinition by sub-classes -
toString
-
throwFromIOE
- Throws:
XMLStreamException
-
stringsWithNullsEqual
Comparison method that will consider null Strings to be equivalent to empty Strings for comparison purposes; and compare equality with that caveat. -
iteratedEquals
-
addHash
-
getLocation()
instead.