< prev index next >

src/java.xml/share/classes/org/xml/sax/helpers/AttributesImpl.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 // AttributesImpl.java - default implementation of Attributes.
  27 // http://www.saxproject.org
  28 // Written by David Megginson
  29 // NO WARRANTY!  This class is in the public domain.
  30 // $Id: AttributesImpl.java,v 1.2 2004/11/03 22:53:08 jsuttor Exp $
  31 
  32 package org.xml.sax.helpers;
  33 
  34 import org.xml.sax.Attributes;
  35 
  36 
  37 /**
  38  * Default implementation of the Attributes interface.
  39  *
  40  * <blockquote>
  41  * <em>This module, both source code and documentation, is in the
  42  * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
  43  * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
  44  * for further information.
  45  * </blockquote>
  46  *
  47  * <p>This class provides a default implementation of the SAX2
  48  * {@link org.xml.sax.Attributes Attributes} interface, with the
  49  * addition of manipulators so that the list can be modified or
  50  * reused.</p>
  51  *
  52  * <p>There are two typical uses of this class:</p>
  53  *
  54  * <ol>
  55  * <li>to take a persistent snapshot of an Attributes object
  56  *  in a {@link org.xml.sax.ContentHandler#startElement startElement} event; or</li>
  57  * <li>to construct or modify an Attributes object in a SAX2 driver or filter.</li>
  58  * </ol>
  59  *
  60  * <p>This class replaces the now-deprecated SAX1 {@link
  61  * org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
  62  * class; in addition to supporting the updated Attributes
  63  * interface rather than the deprecated {@link org.xml.sax.AttributeList
  64  * AttributeList} interface, it also includes a much more efficient
  65  * implementation using a single array rather than a set of Vectors.</p>


   1 /*
   2  * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 






  26 package org.xml.sax.helpers;
  27 
  28 import org.xml.sax.Attributes;
  29 
  30 
  31 /**
  32  * Default implementation of the Attributes interface.







  33  *
  34  * <p>This class provides a default implementation of the SAX2
  35  * {@link org.xml.sax.Attributes Attributes} interface, with the
  36  * addition of manipulators so that the list can be modified or
  37  * reused.</p>
  38  *
  39  * <p>There are two typical uses of this class:</p>
  40  *
  41  * <ol>
  42  * <li>to take a persistent snapshot of an Attributes object
  43  *  in a {@link org.xml.sax.ContentHandler#startElement startElement} event; or</li>
  44  * <li>to construct or modify an Attributes object in a SAX2 driver or filter.</li>
  45  * </ol>
  46  *
  47  * <p>This class replaces the now-deprecated SAX1 {@link
  48  * org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
  49  * class; in addition to supporting the updated Attributes
  50  * interface rather than the deprecated {@link org.xml.sax.AttributeList
  51  * AttributeList} interface, it also includes a much more efficient
  52  * implementation using a single array rather than a set of Vectors.</p>


< prev index next >