## javanet.staxutils.events
Class AttributeEvent

    java.lang.Object
      javanet.staxutils.events.AbstractXMLEvent
          javanet.staxutils.events.AttributeEvent

All Implemented Interfaces:
  Serializable, Cloneable, ExtendedXMLEvent, Attribute, XMLEvent, XMLStreamConstants

Direct Known Subclasses:
  NamespaceEvent

    public class AttributeEvent

extends AbstractXMLEvent
implements Attribute

`Attribute` event implementation.

Version:
  $Revision: 1.3 $
Author:
  Christian Niles
See Also:
  Serialized Form

Field Summary

Fields inherited from class javanet.staxutils.events.AbstractXMLEvent
`location, schemaType`

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
`AttributeEvent(Attribute that)` Copy constructor.
`AttributeEvent(QName name, String value)` Constructs an `AttributeEvent` with the specified name and value.
`AttributeEvent(QName name, String value, Attribute that)` Copy constructor that optionally allows the name and/or value to be changed.
`AttributeEvent(QName name, String value, boolean specified)` Constructs a new `AttributeEvent`.
`AttributeEvent(QName name, String value, boolean specified, String dtdType, Location location, QName schemaType)` Constructs a new `AttributeEvent`.
`AttributeEvent(QName name, String value, Location location)` Constructs a new `AttributeEvent`.
`AttributeEvent(QName name, String value, Location location, QName schemaType)` Constructs a new `AttributeEvent`.

Method Summary
`String` `getDTDType()`
`int` `getEventType()` Returns `XMLStreamConstants.ATTRIBUTE`.
`QName` `getName()`
`String` `getValue()`
`boolean` `isSpecified()`

Methods inherited from class javanet.staxutils.events.AbstractXMLEvent
`asCharacters, asEndElement, asStartElement, clone, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, matches, toString, writeAsEncodedUnicode, writeEvent`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface javax.xml.stream.events.XMLEvent
`asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode`

Constructor Detail

### AttributeEvent

    public AttributeEvent(QName name,
                          String value)

  Constructs an `AttributeEvent` with the specified name and value.

  Parameters:
    `name` - The qualified attribute name.
    `value` - The attribute value.

### AttributeEvent

    public AttributeEvent(QName name,
                          String value,
                          boolean specified)

  Constructs a new `AttributeEvent`.

  Parameters:
    `name` - The qualified attribute name.
    `value` - The attribute value.
    `specified` - Whether the attribute was specified in the document (`true</code), or inherited from a DTD or schema (<code>false`).

### AttributeEvent

    public AttributeEvent(QName name,
                          String value,
                          Location location)

  Constructs a new `AttributeEvent`.

  Parameters:
    `name` - The qualified attribute name.
    `value` - The attribute value.
    `location` - The `Location` of the attribute.

### AttributeEvent

    public AttributeEvent(QName name,
                          String value,
                          Location location,
                          QName schemaType)

  Constructs a new `AttributeEvent`.

  Parameters:
    `name` - The qualified attribute name.
    `value` - The attribute value.
    `location` - The `Location` of the attribute.
    `schemaType` - The attribute type as specified in the schema.

### AttributeEvent

    public AttributeEvent(QName name,
                          String value,
                          boolean specified,
                          String dtdType,
                          Location location,
                          QName schemaType)

  Constructs a new `AttributeEvent`.

  Parameters:
    `name` - The qualified attribute name.
    `value` - The attribute value.
    `specified` - Whether the attribute was specified in the document (`true</code), or inherited from a DTD or schema (<code>false`).
    `location` - The `Location` of the attribute.
    `dtdType` - The attribute type as specified in the DTD.
    `schemaType` - The attribute type as specified in the schema.

### AttributeEvent

    public AttributeEvent(QName name,
                          String value,
                          Attribute that)

  Copy constructor that optionally allows the name and/or value to be changed.

  Parameters:
    `name` - The new attribute name, or `null` to use the name from the provided attribute.
    `value` - The new attribute value, or `null` to use the value from the provided attribute.
    `that` - The `Attribute` event to copy.

### AttributeEvent

    public AttributeEvent(Attribute that)

  Copy constructor.

  Parameters:
    `that` - The `Attribute` event to copy.

Method Detail

### getEventType

    public int getEventType()

  Returns `XMLStreamConstants.ATTRIBUTE`.

  Specified by:
    `getEventType` in interface `XMLEvent`

### getName

    public QName getName()

  Specified by:
    `getName` in interface `Attribute`

### getValue

    public String getValue()

  Specified by:
    `getValue` in interface `Attribute`

### isSpecified

    public boolean isSpecified()

  Specified by:
    `isSpecified` in interface `Attribute`

### getDTDType

    public String getDTDType()

  Specified by:
    `getDTDType` in interface `Attribute`