Top Fields Constructors Methods
org.codehaus.stax2.ri.evt

public Class AttributeEventImpl

extends BaseEventImpl
implements Attribute
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.Attribute, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Known Direct Subclasses
org.codehaus.stax2.ri.evt.NamespaceEventImpl
Imports
java.io.IOException, .Writer, javax.xml.namespace.QName, javax.xml.stream.*, javax.xml.stream.events.Attribute, org.codehaus.stax2.XMLStreamWriter2

Field Summary

Modifier and TypeField and Description
pack-priv final QName
pack-priv final String
pack-priv final boolean
Inherited from org.codehaus.stax2.ri.evt.BaseEventImpl:
mLocation

Constructor Summary

AccessConstructor and Description
public
AttributeEventImpl(Location loc, String localName, String uri, String prefix, String value, boolean wasSpecified)

public
AttributeEventImpl(Location loc, QName name, String value, boolean wasSpecified)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
o
)

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.equals.

Declared abstract to force redefinition by sub-classes
public String
getDTDType()

Implements javax.xml.stream.events.Attribute.getDTDType.

Gets the type of this attribute, default is the String "CDATA".
public int
getEventType()

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.getEventType.

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

Returns an integer code for this event.
public QName
getName()

Implements javax.xml.stream.events.Attribute.getName.

Returns the QName for this attribute.
public String
getValue()

Implements javax.xml.stream.events.Attribute.getValue.

Gets the normalized value of this attribute.
public int
hashCode()

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.hashCode.

Declared abstract to force redefinition by sub-classes
public boolean
isAttribute()

Overrides org.codehaus.stax2.ri.evt.BaseEventImpl.isAttribute.

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

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

Implements javax.xml.stream.events.Attribute.isSpecified.

A flag indicating whether this attribute was actually specified in the start-tag of its element, or was defaulted from the schema.
public void
writeAsEncodedUnicode(Writer
The writer that will output the data
w
)

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.writeAsEncodedUnicode.

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
protected static void
public void
Inherited from org.codehaus.stax2.ri.evt.BaseEventImpl:
addHashasCharactersasEndElementasStartElementgetLocationgetSchemaTypeisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartDocumentisStartElementiteratedEqualsstringsWithNullsEqualthrowFromIOEtoString

Field Detail

mNameback to summary
pack-priv final QName mName
mValueback to summary
pack-priv final String mValue
mWasSpecifiedback to summary
pack-priv final boolean mWasSpecified

Constructor Detail

AttributeEventImplback to summary
public AttributeEventImpl(Location loc, String localName, String uri, String prefix, String value, boolean wasSpecified)
AttributeEventImplback to summary
public AttributeEventImpl(Location loc, QName name, String value, boolean wasSpecified)

Method Detail

equalsback to summary
public boolean equals(Object o)

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.equals.

Doc from org.codehaus.stax2.ri.evt.BaseEventImpl.equals.

Declared abstract to force redefinition by sub-classes

Parameters
o:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getDTDTypeback to summary
public String getDTDType()

Implements javax.xml.stream.events.Attribute.getDTDType.

Doc from javax.xml.stream.events.Attribute.getDTDType.

Gets the type of this attribute, default is the String "CDATA".

Returns:String

the type as a String, default is "CDATA"

Annotations
@Override
getEventTypeback to summary
public int getEventType()

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.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

Annotations
@Override
getNameback to summary
public QName getName()

Implements javax.xml.stream.events.Attribute.getName.

Doc from javax.xml.stream.events.Attribute.getName.

Returns the QName for this attribute.

Returns:QName

the QName of the attribute

Annotations
@Override
getValueback to summary
public String getValue()

Implements javax.xml.stream.events.Attribute.getValue.

Doc from javax.xml.stream.events.Attribute.getValue.

Gets the normalized value of this attribute.

Returns:String

the normalized value of the attribute

Annotations
@Override
hashCodeback to summary
public int hashCode()

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.hashCode.

Doc from org.codehaus.stax2.ri.evt.BaseEventImpl.hashCode.

Declared abstract to force redefinition by sub-classes

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

Annotations
@Override
isAttributeback to summary
public boolean isAttribute()

Overrides org.codehaus.stax2.ri.evt.BaseEventImpl.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

Annotations
@Override
isSpecifiedback to summary
public boolean isSpecified()

Implements javax.xml.stream.events.Attribute.isSpecified.

Doc from javax.xml.stream.events.Attribute.isSpecified.

A flag indicating whether this attribute was actually specified in the start-tag of its element, or was defaulted from the schema.

Returns:boolean

returns true if this was specified in the start element

Annotations
@Override
writeAsEncodedUnicodeback to summary
public void writeAsEncodedUnicode(Writer w) throws XMLStreamException

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.writeAsEncodedUnicode.

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

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

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. No indentation or whitespace should be outputted. Any user defined event type SHALL have this method called when being written to on an output stream. Built in Event types MUST implement this method, but implementations MAY choose not call these methods for optimizations reasons when writing out built in Events to an output stream. The output generated MUST be equivalent in terms of the infoset expressed.

Parameters
w:Writer

The writer that will output the data

Annotations
@Override
Exceptions
XMLStreamException:
if there is a fatal error writing the event
writeEscapedAttrValueback to summary
protected static void writeEscapedAttrValue(Writer w, String value) throws IOException
writeUsingback to summary
public void writeUsing(XMLStreamWriter2 w) throws XMLStreamException

Implements abstract org.codehaus.stax2.ri.evt.BaseEventImpl.writeUsing.

Implements org.codehaus.stax2.evt.XMLEvent2.writeUsing.

Annotations
@Override