Package com.ctc.wstx.evt
Class CompactStartElement
- java.lang.Object
-
- org.codehaus.stax2.ri.evt.BaseEventImpl
-
- com.ctc.wstx.evt.BaseStartElement
-
- com.ctc.wstx.evt.CompactStartElement
-
- All Implemented Interfaces:
javax.xml.stream.events.StartElement,javax.xml.stream.events.XMLEvent,javax.xml.stream.XMLStreamConstants,org.codehaus.stax2.evt.XMLEvent2
public class CompactStartElement extends BaseStartElement
WstxStartElementimplementation used when directly creating events from a stream reader.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<javax.xml.stream.events.Attribute>mAttrListLazily created List that contains Attribute instances contained in this list.(package private) ElemAttrsmAttrsContainer object that has enough information about attributes to be able to implement attribute accessor methods of this class.(package private) java.lang.String[]mRawAttrsArray needed for accessing actual String components of the attributesprivate static intOFFSET_NS_PREFIXprivate static intOFFSET_NS_URIprivate static intOFFSET_VALUE-
Fields inherited from class com.ctc.wstx.evt.BaseStartElement
mName, mNsCtxt
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompactStartElement(javax.xml.stream.Location loc, javax.xml.namespace.QName name, BaseNsContext nsCtxt, ElemAttrs attrs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.xml.stream.events.AttributeconstructAttr(java.lang.String[] raw, int rawIndex, boolean isDef)javax.xml.stream.events.AttributegetAttributeByName(javax.xml.namespace.QName name)java.util.Iterator<javax.xml.stream.events.Attribute>getAttributes()protected voidoutputNsAndAttr(java.io.Writer w)protected voidoutputNsAndAttr(javax.xml.stream.XMLStreamWriter w)-
Methods inherited from class com.ctc.wstx.evt.BaseStartElement
asStartElement, equals, getEventType, getName, getNamespaceContext, getNamespaces, getNamespaceURI, hashCode, isStartElement, writeAsEncodedUnicode, writeUsing
-
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
-
-
-
-
Field Detail
-
OFFSET_NS_URI
private static final int OFFSET_NS_URI
- See Also:
- Constant Field Values
-
OFFSET_NS_PREFIX
private static final int OFFSET_NS_PREFIX
- See Also:
- Constant Field Values
-
OFFSET_VALUE
private static final int OFFSET_VALUE
- See Also:
- Constant Field Values
-
mAttrs
final ElemAttrs mAttrs
Container object that has enough information about attributes to be able to implement attribute accessor methods of this class.
-
mRawAttrs
final java.lang.String[] mRawAttrs
Array needed for accessing actual String components of the attributes
-
mAttrList
private java.util.ArrayList<javax.xml.stream.events.Attribute> mAttrList
Lazily created List that contains Attribute instances contained in this list. Created only if there are at least 2 attributes.
-
-
Constructor Detail
-
CompactStartElement
protected CompactStartElement(javax.xml.stream.Location loc, javax.xml.namespace.QName name, BaseNsContext nsCtxt, ElemAttrs attrs)
-
-
Method Detail
-
getAttributeByName
public javax.xml.stream.events.Attribute getAttributeByName(javax.xml.namespace.QName name)
- Specified by:
getAttributeByNamein interfacejavax.xml.stream.events.StartElement- Specified by:
getAttributeByNamein classBaseStartElement
-
getAttributes
public java.util.Iterator<javax.xml.stream.events.Attribute> getAttributes()
- Specified by:
getAttributesin interfacejavax.xml.stream.events.StartElement- Specified by:
getAttributesin classBaseStartElement
-
outputNsAndAttr
protected void outputNsAndAttr(java.io.Writer w) throws java.io.IOException- Specified by:
outputNsAndAttrin classBaseStartElement- Throws:
java.io.IOException
-
outputNsAndAttr
protected void outputNsAndAttr(javax.xml.stream.XMLStreamWriter w) throws javax.xml.stream.XMLStreamException- Specified by:
outputNsAndAttrin classBaseStartElement- Throws:
javax.xml.stream.XMLStreamException
-
constructAttr
protected javax.xml.stream.events.Attribute constructAttr(java.lang.String[] raw, int rawIndex, boolean isDef)
-
-