org.codehaus.stax2.ri.evt
Class StartElementEventImpl

java.lang.Object
  extended by org.codehaus.stax2.ri.evt.BaseEventImpl
      extended by org.codehaus.stax2.ri.evt.StartElementEventImpl
All Implemented Interfaces:
StartElement, XMLEvent, XMLStreamConstants, XMLEvent2

public class StartElementEventImpl
extends BaseEventImpl
implements StartElement

Wstx StartElement implementation used when event is constructed from already objectified data, for example when constructed by the event factory.


Field Summary
protected  ArrayList mAttrs
           
protected  QName mName
           
protected  ArrayList mNsDecls
           
protected  NamespaceContext mParentNsCtxt
          Enclosing namespace context
 
Fields inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
mLocation
 
Fields 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
protected StartElementEventImpl(Location loc, QName name, ArrayList attrs, ArrayList nsDecls, NamespaceContext parentNsCtxt)
           
 
Method Summary
 StartElement asStartElement()
           
static StartElementEventImpl construct(Location loc, QName name, Iterator attrIt, Iterator nsDeclIt, NamespaceContext nsCtxt)
           
 boolean equals(Object o)
          Declared abstract to force redefinition by sub-classes
 Attribute getAttributeByName(QName nameIn)
           
 Iterator getAttributes()
           
 int getEventType()
           
 QName getName()
           
 NamespaceContext getNamespaceContext()
           
 Iterator getNamespaces()
           
 String getNamespaceURI(String prefix)
           
 int hashCode()
          Declared abstract to force redefinition by sub-classes
 boolean isStartElement()
           
 void writeAsEncodedUnicode(Writer w)
           
 void writeUsing(XMLStreamWriter2 sw)
           
 
Methods inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
addHash, asCharacters, asEndElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, iteratedEquals, stringsWithNullsEqual, throwFromIOE, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument
 

Field Detail

mName

protected final QName mName

mAttrs

protected final ArrayList mAttrs

mNsDecls

protected final ArrayList mNsDecls

mParentNsCtxt

protected NamespaceContext mParentNsCtxt
Enclosing namespace context

Constructor Detail

StartElementEventImpl

protected StartElementEventImpl(Location loc,
                                QName name,
                                ArrayList attrs,
                                ArrayList nsDecls,
                                NamespaceContext parentNsCtxt)
Method Detail

construct

public static StartElementEventImpl construct(Location loc,
                                              QName name,
                                              Iterator attrIt,
                                              Iterator nsDeclIt,
                                              NamespaceContext nsCtxt)

asStartElement

public StartElement asStartElement()
Specified by:
asStartElement in interface XMLEvent
Overrides:
asStartElement in class BaseEventImpl

getEventType

public int getEventType()
Specified by:
getEventType in interface XMLEvent
Specified by:
getEventType in class BaseEventImpl

isStartElement

public boolean isStartElement()
Specified by:
isStartElement in interface XMLEvent
Overrides:
isStartElement in class BaseEventImpl

writeAsEncodedUnicode

public void writeAsEncodedUnicode(Writer w)
                           throws XMLStreamException
Specified by:
writeAsEncodedUnicode in interface XMLEvent
Specified by:
writeAsEncodedUnicode in class BaseEventImpl
Throws:
XMLStreamException

writeUsing

public void writeUsing(XMLStreamWriter2 sw)
                throws XMLStreamException
Specified by:
writeUsing in interface XMLEvent2
Specified by:
writeUsing in class BaseEventImpl
Throws:
XMLStreamException

getName

public final QName getName()
Specified by:
getName in interface StartElement

getNamespaces

public Iterator getNamespaces()
Specified by:
getNamespaces in interface StartElement

getNamespaceContext

public NamespaceContext getNamespaceContext()
Specified by:
getNamespaceContext in interface StartElement

getNamespaceURI

public String getNamespaceURI(String prefix)
Specified by:
getNamespaceURI in interface StartElement

getAttributeByName

public Attribute getAttributeByName(QName nameIn)
Specified by:
getAttributeByName in interface StartElement

getAttributes

public Iterator getAttributes()
Specified by:
getAttributes in interface StartElement

equals

public boolean equals(Object o)
Description copied from class: BaseEventImpl
Declared abstract to force redefinition by sub-classes

Specified by:
equals in class BaseEventImpl

hashCode

public int hashCode()
Description copied from class: BaseEventImpl
Declared abstract to force redefinition by sub-classes

Specified by:
hashCode in class BaseEventImpl