Module java.xml

Class AttributesImpl

java.lang.Object
org.xml.sax.helpers.AttributesImpl
All Implemented Interfaces:
Attributes
Direct Known Subclasses:
Attributes2Impl

public class AttributesImpl extends Object implements Attributes
Default implementation of the Attributes interface.

This class provides a default implementation of the SAX2 Attributes interface, with the addition of manipulators so that the list can be modified or reused.

There are two typical uses of this class:

  1. to take a persistent snapshot of an Attributes object in a startElement event; or
  2. to construct or modify an Attributes object in a SAX2 driver or filter.

This class replaces the now-deprecated SAX1 AttributeListImpl class; in addition to supporting the updated Attributes interface rather than the deprecated AttributeList interface, it also includes a much more efficient implementation using a single array rather than a set of Vectors.

Since:
1.4, SAX 2.0