Top Description Fields Constructors Methods
com.ctc.wstx.evt

public Class CompactStartElement

extends BaseStartElement
Class Inheritance
Imports
java.io.IOException, .Writer, java.util.ArrayList, .Iterator, javax.xml.namespace.QName, javax.xml.stream.*, javax.xml.stream.events.Attribute, .StartElement, org.codehaus.stax2.ri.evt.AttributeEventImpl, com.ctc.wstx.io.TextEscaper, com.ctc.wstx.sr.ElemAttrs, com.ctc.wstx.util.BaseNsContext, .DataUtil

Wstx StartElement implementation used when directly creating events from a stream reader.

Field Summary

Modifier and TypeField and Description
private ArrayList<Attribute>
mAttrList

Lazily created List that contains Attribute instances contained in this list.

pack-priv final ElemAttrs
mAttrs

Container object that has enough information about attributes to be able to implement attribute accessor methods of this class.

pack-priv final String[]
mRawAttrs

Array needed for accessing actual String components of the attributes

private static final int
private static final int
private static final int
Inherited from com.ctc.wstx.evt.BaseStartElement:
mNamemNsCtxt

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected Attribute
constructAttr(String[] raw, int rawIndex, boolean isDef)

public Attribute
getAttributeByName(QName
the qname of the desired attribute
name
)

Implements abstract com.ctc.wstx.evt.BaseStartElement.getAttributeByName.

Implements javax.xml.stream.events.StartElement.getAttributeByName.

Returns the attribute referred to by the qname.

public Iterator<Attribute>
getAttributes()

Implements abstract com.ctc.wstx.evt.BaseStartElement.getAttributes.

Implements javax.xml.stream.events.StartElement.getAttributes.

Returns an Iterator of non-namespace attributes declared on this START_ELEMENT.

protected void
protected void
Inherited from com.ctc.wstx.evt.BaseStartElement:
asStartElementequalsgetEventTypegetNamegetNamespaceContextgetNamespacesgetNamespaceURIhashCodeisStartElementwriteAsEncodedUnicodewriteUsing

Field Detail

mAttrListback to summary
private ArrayList<Attribute> mAttrList

Lazily created List that contains Attribute instances contained in this list. Created only if there are at least 2 attributes.

mAttrsback to summary
pack-priv final ElemAttrs mAttrs

Container object that has enough information about attributes to be able to implement attribute accessor methods of this class.

mRawAttrsback to summary
pack-priv final String[] mRawAttrs

Array needed for accessing actual String components of the attributes

OFFSET_NS_PREFIXback to summary
private static final int OFFSET_NS_PREFIX
OFFSET_NS_URIback to summary
private static final int OFFSET_NS_URI
OFFSET_VALUEback to summary
private static final int OFFSET_VALUE

Constructor Detail

CompactStartElementback to summary
protected CompactStartElement(Location loc, QName name, BaseNsContext nsCtxt, ElemAttrs attrs)

Method Detail

constructAttrback to summary
protected Attribute constructAttr(String[] raw, int rawIndex, boolean isDef)
getAttributeByNameback to summary
public Attribute getAttributeByName(QName name)

Implements abstract com.ctc.wstx.evt.BaseStartElement.getAttributeByName.

Implements javax.xml.stream.events.StartElement.getAttributeByName.

Doc from javax.xml.stream.events.StartElement.getAttributeByName.

Returns the attribute referred to by the qname.

Parameters
name:QName

the qname of the desired attribute

Returns:Attribute

the attribute corresponding to the name value or null

Annotations
@Override
getAttributesback to summary
public Iterator<Attribute> getAttributes()

Implements abstract com.ctc.wstx.evt.BaseStartElement.getAttributes.

Implements javax.xml.stream.events.StartElement.getAttributes.

Doc from javax.xml.stream.events.StartElement.getAttributes.

Returns an Iterator of non-namespace attributes declared on this START_ELEMENT. Returns an empty iterator if there are no attributes. The iterator must contain only implementations of the Attribute interface. Attributes are fundamentally unordered and may be reported in any order.

Returns:Iterator<Attribute>

a readonly Iterator over Attribute interfaces, or an empty iterator

Annotations
@Override
outputNsAndAttrback to summary
protected void outputNsAndAttr(Writer w) throws IOException

Implements abstract com.ctc.wstx.evt.BaseStartElement.outputNsAndAttr.

Annotations
@Override
outputNsAndAttrback to summary
protected void outputNsAndAttr(XMLStreamWriter w) throws XMLStreamException

Implements abstract com.ctc.wstx.evt.BaseStartElement.outputNsAndAttr.

Annotations
@Override