Top Fields Constructors Methods
org.apache.xerces.stax.events

pack-priv abstract Class XMLEventImpl

extends Object
implements XMLEvent
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Known Direct Subclasses
org.apache.xerces.stax.events.AttributeImpl, org.apache.xerces.stax.events.CharactersImpl, org.apache.xerces.stax.events.CommentImpl, org.apache.xerces.stax.events.DTDImpl, org.apache.xerces.stax.events.ElementImpl, org.apache.xerces.stax.events.EndDocumentImpl, org.apache.xerces.stax.events.EntityDeclarationImpl, org.apache.xerces.stax.events.EntityReferenceImpl, org.apache.xerces.stax.events.NotationDeclarationImpl, org.apache.xerces.stax.events.ProcessingInstructionImpl, org.apache.xerces.stax.events.StartDocumentImpl
Imports
java.io.StringWriter, javax.xml.namespace.QName, javax.xml.stream.Location, .XMLStreamException, javax.xml.stream.events.Characters, .EndElement, .StartElement, .XMLEvent, org.apache.xerces.stax.EmptyLocation, .ImmutableLocation

Author
Lucian Holland
Version
$Id: XMLEventImpl.java 956312 2010-06-20 00:47:28Z mrglavas $

Field Summary

Modifier and TypeField and Description
private int
fEventType

Constant representing the type of this event.

private Location
fLocation

Location object for this event.

Constructor Summary

AccessConstructor and Description
pack-priv
XMLEventImpl(final int eventType, final Location location)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public final Characters
asCharacters()

Implements javax.xml.stream.events.XMLEvent.asCharacters.

Returns this event as Characters, may result in a class cast exception if this event is not Characters.
public final EndElement
asEndElement()

Implements javax.xml.stream.events.XMLEvent.asEndElement.

Returns this event as an end element event, may result in a class cast exception if this event is not a end element.
public final StartElement
asStartElement()

Implements javax.xml.stream.events.XMLEvent.asStartElement.

Returns this event as a start element event, may result in a class cast exception if this event is not a start element.
public final int
getEventType()

Implements javax.xml.stream.events.XMLEvent.getEventType.

Returns an integer code for this event.
public final Location
getLocation()

Implements javax.xml.stream.events.XMLEvent.getLocation.

Return the location of this event.
public final QName
getSchemaType()

Implements javax.xml.stream.events.XMLEvent.getSchemaType.

This method is provided for implementations to provide optional type information about the associated event.
public final boolean
isAttribute()

Implements javax.xml.stream.events.XMLEvent.isAttribute.

A utility function to check if this event is an Attribute.
public final boolean
isCharacters()

Implements javax.xml.stream.events.XMLEvent.isCharacters.

A utility function to check if this event is Characters.
public final boolean
isEndDocument()

Implements javax.xml.stream.events.XMLEvent.isEndDocument.

A utility function to check if this event is an EndDocument.
public final boolean
isEndElement()

Implements javax.xml.stream.events.XMLEvent.isEndElement.

A utility function to check if this event is a EndElement.
public final boolean
isEntityReference()

Implements javax.xml.stream.events.XMLEvent.isEntityReference.

A utility function to check if this event is an EntityReference.
public final boolean
isNamespace()

Implements javax.xml.stream.events.XMLEvent.isNamespace.

A utility function to check if this event is a Namespace.
public final boolean
isProcessingInstruction()

Implements javax.xml.stream.events.XMLEvent.isProcessingInstruction.

A utility function to check if this event is a ProcessingInstruction.
public final boolean
isStartDocument()

Implements javax.xml.stream.events.XMLEvent.isStartDocument.

A utility function to check if this event is a StartDocument.
public final boolean
isStartElement()

Implements javax.xml.stream.events.XMLEvent.isStartElement.

A utility function to check if this event is a StartElement.
public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

fEventTypeback to summary
private int fEventType

Constant representing the type of this event. javax.xml.stream.XMLStreamConstants

See Also
javax.xml.stream.XMLStreamConstants
fLocationback to summary
private Location fLocation

Location object for this event.

Constructor Detail

XMLEventImplback to summary
pack-priv XMLEventImpl(final int eventType, final Location location)

Constructor.

Method Detail

asCharactersback to summary
public final Characters asCharacters()

Implements javax.xml.stream.events.XMLEvent.asCharacters.

Doc from javax.xml.stream.events.XMLEvent.asCharacters.

Returns this event as Characters, may result in a class cast exception if this event is not Characters.

Returns:Characters

a Characters event

See Also
javax.xml.stream.events.XMLEvent#asCharacters()
asEndElementback to summary
public final EndElement asEndElement()

Implements javax.xml.stream.events.XMLEvent.asEndElement.

Doc from javax.xml.stream.events.XMLEvent.asEndElement.

Returns this event as an end element event, may result in a class cast exception if this event is not a end element.

Returns:EndElement

a EndElement event

See Also
javax.xml.stream.events.XMLEvent#asEndElement()
asStartElementback to summary
public final StartElement asStartElement()

Implements javax.xml.stream.events.XMLEvent.asStartElement.

Doc from javax.xml.stream.events.XMLEvent.asStartElement.

Returns this event as a start element event, may result in a class cast exception if this event is not a start element.

Returns:StartElement

a StartElement event

See Also
javax.xml.stream.events.XMLEvent#asStartElement()
getEventTypeback to summary
public final int getEventType()

Implements javax.xml.stream.events.XMLEvent.getEventType.

Doc from javax.xml.stream.events.XMLEvent.getEventType.

Returns an integer code for this event.

Returns:int

the event type

See Also
javax.xml.stream.events.XMLEvent#getEventType()
getLocationback to summary
public final Location getLocation()

Implements javax.xml.stream.events.XMLEvent.getLocation.

Doc from javax.xml.stream.events.XMLEvent.getLocation.

Return the location of this event. The Location returned from this method is non-volatile and will retain its information.

Returns:Location

the location of the event

See Also
javax.xml.stream.events.XMLEvent#getLocation()
getSchemaTypeback to summary
public final QName getSchemaType()

Implements javax.xml.stream.events.XMLEvent.getSchemaType.

Doc from javax.xml.stream.events.XMLEvent.getSchemaType.

This method is provided for implementations to provide optional type information about the associated event. It is optional and will return null if no information is available.

Returns:QName

the type of the event, null if not available

See Also
javax.xml.stream.events.XMLEvent#getSchemaType()
isAttributeback to summary
public final boolean isAttribute()

Implements javax.xml.stream.events.XMLEvent.isAttribute.

Doc from javax.xml.stream.events.XMLEvent.isAttribute.

A utility function to check if this event is an Attribute.

Returns:boolean

true if the event is Attribute, false otherwise

See Also
javax.xml.stream.events.XMLEvent#isAttribute()
isCharactersback to summary
public final boolean isCharacters()

Implements javax.xml.stream.events.XMLEvent.isCharacters.

Doc from javax.xml.stream.events.XMLEvent.isCharacters.

A utility function to check if this event is Characters.

Returns:boolean

true if the event is Characters, false otherwise

See Also
javax.xml.stream.events.XMLEvent#isCharacters()
isEndDocumentback to summary
public final boolean isEndDocument()

Implements javax.xml.stream.events.XMLEvent.isEndDocument.

Doc from javax.xml.stream.events.XMLEvent.isEndDocument.

A utility function to check if this event is an EndDocument.

Returns:boolean

true if the event is EndDocument, false otherwise

See Also
javax.xml.stream.events.XMLEvent#isEndDocument()
isEndElementback to summary
public final boolean isEndElement()

Implements javax.xml.stream.events.XMLEvent.isEndElement.

Doc from javax.xml.stream.events.XMLEvent.isEndElement.

A utility function to check if this event is a EndElement.

Returns:boolean

true if the event is EndElement, false otherwise

See Also
javax.xml.stream.events.XMLEvent#isEndElement()
isEntityReferenceback to summary
public final boolean isEntityReference()

Implements javax.xml.stream.events.XMLEvent.isEntityReference.

Doc from javax.xml.stream.events.XMLEvent.isEntityReference.

A utility function to check if this event is an EntityReference.

Returns:boolean

true if the event is EntityReference, false otherwise

See Also
javax.xml.stream.events.XMLEvent#isEntityReference()
isNamespaceback to summary
public final boolean isNamespace()

Implements javax.xml.stream.events.XMLEvent.isNamespace.

Doc from javax.xml.stream.events.XMLEvent.isNamespace.

A utility function to check if this event is a Namespace.

Returns:boolean

true if the event is Namespace, false otherwise

See Also
javax.xml.stream.events.XMLEvent#isNamespace()
isProcessingInstructionback to summary
public final boolean isProcessingInstruction()

Implements javax.xml.stream.events.XMLEvent.isProcessingInstruction.

Doc from javax.xml.stream.events.XMLEvent.isProcessingInstruction.

A utility function to check if this event is a ProcessingInstruction.

Returns:boolean

true if the event is ProcessingInstruction, false otherwise

See Also
javax.xml.stream.events.XMLEvent#isProcessingInstruction()
isStartDocumentback to summary
public final boolean isStartDocument()

Implements javax.xml.stream.events.XMLEvent.isStartDocument.

Doc from javax.xml.stream.events.XMLEvent.isStartDocument.

A utility function to check if this event is a StartDocument.

Returns:boolean

true if the event is StartDocument, false otherwise

See Also
javax.xml.stream.events.XMLEvent#isStartDocument()
isStartElementback to summary
public final boolean isStartElement()

Implements javax.xml.stream.events.XMLEvent.isStartElement.

Doc from javax.xml.stream.events.XMLEvent.isStartElement.

A utility function to check if this event is a StartElement.

Returns:boolean

true if the event is StartElement, false otherwise

See Also
javax.xml.stream.events.XMLEvent#isStartElement()
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.