jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java
author joehw
Mon, 17 Jul 2017 14:40:00 -0700
changeset 45903 cb2719d70590
parent 44280 d299a23c65e2
permissions -rw-r--r--
8183519: XMLInputFactory.newFactory() is marked as deprecated Reviewed-by: lancea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     1
/*
45903
cb2719d70590 8183519: XMLInputFactory.newFactory() is marked as deprecated
joehw
parents: 44280
diff changeset
     2
 * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     4
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    10
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    15
 * accompanied this code).
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    16
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    20
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    23
 * questions.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    24
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    25
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    26
package javax.xml.stream;
42390
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    27
import com.sun.xml.internal.stream.events.XMLEventFactoryImpl;
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    28
import java.util.Iterator;
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    29
import javax.xml.namespace.NamespaceContext;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    30
import javax.xml.namespace.QName;
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    31
import javax.xml.stream.events.*;
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    32
/**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    33
 * This interface defines a utility class for creating instances of
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    34
 * XMLEvents
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    35
 * @version 1.2
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    36
 * @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    37
 * @see javax.xml.stream.events.StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    38
 * @see javax.xml.stream.events.EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    39
 * @see javax.xml.stream.events.ProcessingInstruction
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    40
 * @see javax.xml.stream.events.Comment
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    41
 * @see javax.xml.stream.events.Characters
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    42
 * @see javax.xml.stream.events.StartDocument
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    43
 * @see javax.xml.stream.events.EndDocument
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    44
 * @see javax.xml.stream.events.DTD
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    45
 * @since 1.6
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    46
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    47
public abstract class XMLEventFactory {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    48
  protected XMLEventFactory(){}
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    49
13624
56ea3a894b56 7191547: XMLEventFactory.newFactory(String factoryId, ClassLoader loader) does not work as expected
joehw
parents: 12457
diff changeset
    50
    static final String JAXPFACTORYID = "javax.xml.stream.XMLEventFactory";
56ea3a894b56 7191547: XMLEventFactory.newFactory(String factoryId, ClassLoader loader) does not work as expected
joehw
parents: 12457
diff changeset
    51
    static final String DEFAULIMPL = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl";
56ea3a894b56 7191547: XMLEventFactory.newFactory(String factoryId, ClassLoader loader) does not work as expected
joehw
parents: 12457
diff changeset
    52
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 42390
diff changeset
    53
   /**
42390
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    54
   * Creates a new instance of the {@code XMLEventFactory} builtin
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    55
   * system-default implementation.
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    56
   *
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    57
   * @return A new instance of the {@code XMLEventFactory} builtin
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    58
   *         system-default implementation.
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    59
   *
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    60
   * @since 9
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    61
   */
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    62
  public static XMLEventFactory newDefaultFactory() {
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    63
      return new XMLEventFactoryImpl();
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    64
  }
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    65
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
    66
  /**
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    67
   * Creates a new instance of the factory in exactly the same manner as the
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    68
   * {@link #newFactory()} method.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    69
   * @throws FactoryConfigurationError if an instance of this factory cannot be loaded
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    70
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    71
  public static XMLEventFactory newInstance()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    72
    throws FactoryConfigurationError
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    73
  {
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    74
    return FactoryFinder.find(XMLEventFactory.class, DEFAULIMPL);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    75
  }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    76
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    77
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    78
   * Create a new instance of the factory.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    79
   * <p>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    80
   * This static method creates a new factory instance.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    81
   * This method uses the following ordered lookup procedure to determine
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    82
   * the XMLEventFactory implementation class to load:
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    83
   * <ul>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    84
   * <li>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    85
   *   Use the javax.xml.stream.XMLEventFactory system property.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    86
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
    87
   * <li>
29419
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    88
   *   <p>
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    89
   *   Use the configuration file "stax.properties". The file is in standard
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    90
   *   {@link java.util.Properties} format and typically located in the
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    91
   *   {@code conf} directory of the Java installation. It contains the fully qualified
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    92
   *   name of the implementation class with the key being the system property
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    93
   *   defined above.
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    94
   *
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    95
   *   <p>
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    96
   *   The stax.properties file is read only once by the implementation
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    97
   *   and its values are then cached for future use.  If the file does not exist
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    98
   *   when the first attempt is made to read from it, no further attempts are
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
    99
   *   made to check for its existence.  It is not possible to change the value
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   100
   *   of any property in stax.properties after it has been read for the first time.
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   101
   *
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   102
   *   <p>
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   103
   *   Use the jaxp configuration file "jaxp.properties". The file is in the same
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   104
   *   format as stax.properties and will only be read if stax.properties does
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   105
   *   not exist.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   106
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   107
   * <li>
29419
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   108
   *   <p>
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   109
   *   Use the service-provider loading facility, defined by the
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   110
   *   {@link java.util.ServiceLoader} class, to attempt to locate and load an
20581
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   111
   *   implementation of the service using the {@linkplain
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   112
   *   java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   113
   *   the service-provider loading facility will use the {@linkplain
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   114
   *   java.lang.Thread#getContextClassLoader() current thread's context class loader}
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   115
   *   to attempt to load the service. If the context class
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   116
   *   loader is null, the {@linkplain
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   117
   *   ClassLoader#getSystemClassLoader() system class loader} will be used.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   118
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   119
   * <li>
29419
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   120
   *   <p>
42390
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
   121
   *   Otherwise, the {@linkplain #newDefaultFactory() system-default}
4083bc2c3b5b 8169778: Add new public methods to get new instances of the JAXP factories builtin system-default implementations
dfuchs
parents: 29999
diff changeset
   122
   *   implementation is returned.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   123
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   124
   * </ul>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   125
   * <p>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   126
   *   Once an application has obtained a reference to a XMLEventFactory it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   127
   *   can use the factory to configure and obtain stream instances.
29419
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   128
   *
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   129
   * @throws FactoryConfigurationError in case of {@linkplain
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   130
   *   java.util.ServiceConfigurationError service configuration error} or if
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   131
   *   the implementation is not available or cannot be instantiated.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   132
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   133
  public static XMLEventFactory newFactory()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   134
    throws FactoryConfigurationError
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   135
  {
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   136
    return FactoryFinder.find(XMLEventFactory.class, DEFAULIMPL);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   137
  }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   138
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   139
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   140
   * Create a new instance of the factory
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   141
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   142
   * @param factoryId             Name of the factory to find, same as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   143
   *                              a property name
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   144
   * @param classLoader           classLoader to use
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   145
   * @return the factory implementation
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   146
   * @throws FactoryConfigurationError if an instance of this factory cannot be loaded
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   147
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   148
   * @deprecated  This method has been deprecated to maintain API consistency.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   149
   *              All newInstance methods have been replaced with corresponding
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   150
   *              newFactory methods. The replacement {@link
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   151
   *              #newFactory(java.lang.String, java.lang.ClassLoader)}
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   152
   *              method defines no changes in behavior.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   153
   */
44280
d299a23c65e2 8176541: XML deprecation "since" values should use 1.x version form for 1.8 and earlier
joehw
parents: 42802
diff changeset
   154
  @Deprecated(since="1.7")
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   155
  public static XMLEventFactory newInstance(String factoryId,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   156
          ClassLoader classLoader)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   157
          throws FactoryConfigurationError {
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   158
      //do not fallback if given classloader can't find the class, throw exception
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   159
      return FactoryFinder.find(XMLEventFactory.class, factoryId, classLoader, null);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   160
  }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   161
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   162
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   163
   * Create a new instance of the factory.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   164
   * If the classLoader argument is null, then the ContextClassLoader is used.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   165
   * <p>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   166
   * This method uses the following ordered lookup procedure to determine
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   167
   * the XMLEventFactory implementation class to load:
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   168
   * <ul>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   169
   * <li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   170
   *   Use the value of the system property identified by {@code factoryId}.
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   171
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   172
   * <li>
29419
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   173
   *   <p>
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   174
   *   Use the configuration file "stax.properties". The file is in standard
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   175
   *   {@link java.util.Properties} format and typically located in the
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   176
   *   conf directory of the Java installation. It contains the fully qualified
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   177
   *   name of the implementation class with the key being the system property
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   178
   *   defined above.
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   179
   *
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   180
   *   <p>
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   181
   *   The stax.properties file is read only once by the implementation
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   182
   *   and its values are then cached for future use.  If the file does not exist
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   183
   *   when the first attempt is made to read from it, no further attempts are
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   184
   *   made to check for its existence.  It is not possible to change the value
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   185
   *   of any property in stax.properties after it has been read for the first time.
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   186
   *
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   187
   *   <p>
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   188
   *   Use the jaxp configuration file "jaxp.properties". The file is in the same
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   189
   *   format as stax.properties and will only be read if stax.properties does
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   190
   *   not exist.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   191
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   192
   * <li>
29419
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   193
   *   <p>
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   194
   *   If {@code factoryId} is "javax.xml.stream.XMLEventFactory",
29419
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   195
   *   use the service-provider loading facility, defined by the
22673
382d136fbba2 8032392: Spec: javax.xml.stream.XMLEventFactory/XMLOutputFactory/XMLInputFactory.newFactory(String, ClassLoader) referring to ServiceLoader.load(Class, ClassLoader)
joehw
parents: 21997
diff changeset
   196
   *   {@link java.util.ServiceLoader} class, to attempt to {@linkplain
382d136fbba2 8032392: Spec: javax.xml.stream.XMLEventFactory/XMLOutputFactory/XMLInputFactory.newFactory(String, ClassLoader) referring to ServiceLoader.load(Class, ClassLoader)
joehw
parents: 21997
diff changeset
   197
   *   java.util.ServiceLoader#load(java.lang.Class, java.lang.ClassLoader) locate and load}
382d136fbba2 8032392: Spec: javax.xml.stream.XMLEventFactory/XMLOutputFactory/XMLInputFactory.newFactory(String, ClassLoader) referring to ServiceLoader.load(Class, ClassLoader)
joehw
parents: 21997
diff changeset
   198
   *   an implementation of the service using the specified {@code ClassLoader}.
21997
65d2e8e1d666 8027973: Error in the documentation for newFactory method of the javax.xml.stream factories
joehw
parents: 20581
diff changeset
   199
   *   If {@code classLoader} is null, the {@linkplain
65d2e8e1d666 8027973: Error in the documentation for newFactory method of the javax.xml.stream factories
joehw
parents: 20581
diff changeset
   200
   *   java.util.ServiceLoader#load(java.lang.Class) default loading mechanism} will apply:
65d2e8e1d666 8027973: Error in the documentation for newFactory method of the javax.xml.stream factories
joehw
parents: 20581
diff changeset
   201
   *   That is, the service-provider loading facility will use the {@linkplain
20581
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   202
   *   java.lang.Thread#getContextClassLoader() current thread's context class loader}
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   203
   *   to attempt to load the service. If the context class
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   204
   *   loader is null, the {@linkplain
65d17ea72da3 8025745: Clarify API documentation of JAXP factories.
dfuchs
parents: 17264
diff changeset
   205
   *   ClassLoader#getSystemClassLoader() system class loader} will be used.
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   206
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   207
   * <li>
29419
534054ee6062 8049378: Examine references to ${java.home}/lib in JAXP
joehw
parents: 25868
diff changeset
   208
   *   <p>
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   209
   *   Otherwise, throws a {@link FactoryConfigurationError}.
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   210
   * </li>
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   211
   * </ul>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   212
   *
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   213
   * <p>
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   214
   * Note that this is a new method that replaces the deprecated
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   215
   *   {@link #newInstance(java.lang.String, java.lang.ClassLoader)
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   216
   *   newInstance(String factoryId, ClassLoader classLoader)} method.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   217
   * No changes in behavior are defined by this replacement method relative
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   218
   * to the deprecated method.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   219
   *
21997
65d2e8e1d666 8027973: Error in the documentation for newFactory method of the javax.xml.stream factories
joehw
parents: 20581
diff changeset
   220
   * @apiNote The parameter factoryId defined here is inconsistent with that
65d2e8e1d666 8027973: Error in the documentation for newFactory method of the javax.xml.stream factories
joehw
parents: 20581
diff changeset
   221
   * of other JAXP factories where the first parameter is fully qualified
65d2e8e1d666 8027973: Error in the documentation for newFactory method of the javax.xml.stream factories
joehw
parents: 20581
diff changeset
   222
   * factory class name that provides implementation of the factory.
65d2e8e1d666 8027973: Error in the documentation for newFactory method of the javax.xml.stream factories
joehw
parents: 20581
diff changeset
   223
   *
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   224
   * @param factoryId             Name of the factory to find, same as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   225
   *                              a property name
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   226
   * @param classLoader           classLoader to use
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   227
   * @return the factory implementation
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   228
   * @throws FactoryConfigurationError in case of {@linkplain
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   229
   *   java.util.ServiceConfigurationError service configuration error} or if
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   230
   *   the implementation is not available or cannot be instantiated.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   231
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   232
  public static XMLEventFactory newFactory(String factoryId,
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   233
                                           ClassLoader classLoader)
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   234
          throws FactoryConfigurationError {
17264
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   235
      //do not fallback if given classloader can't find the class, throw exception
3aff554ad461 8005954: JAXP Plugability Layer should use java.util.ServiceLoader
dfuchs
parents: 13624
diff changeset
   236
      return FactoryFinder.find(XMLEventFactory.class, factoryId, classLoader, null);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   237
  }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   238
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   239
 /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   240
   * This method allows setting of the Location on each event that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   241
   * is created by this factory.  The values are copied by value into
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   242
   * the events created by this factory.  To reset the location
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   243
   * information set the location to null.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   244
   * @param location the location to set on each event created
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   245
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   246
  public abstract void setLocation(Location location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   247
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   248
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   249
   * Create a new Attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   250
   * @param prefix the prefix of this attribute, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   251
   * @param namespaceURI the attribute value is set to this value, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   252
   * @param localName the local name of the XML name of the attribute, localName cannot be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   253
   * @param value the attribute value to set, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   254
   * @return the Attribute with specified values
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   255
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   256
  public abstract Attribute createAttribute(String prefix, String namespaceURI, String localName, String value);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   257
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   258
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   259
   * Create a new Attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   260
   * @param localName the local name of the XML name of the attribute, localName cannot be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   261
   * @param value the attribute value to set, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   262
   * @return the Attribute with specified values
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   263
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   264
  public abstract Attribute createAttribute(String localName, String value);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   265
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   266
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   267
   * Create a new Attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   268
   * @param name the qualified name of the attribute, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   269
   * @param value the attribute value to set, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   270
   * @return the Attribute with specified values
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   271
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   272
  public abstract Attribute createAttribute(QName name, String value);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   273
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   274
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   275
   * Create a new default Namespace
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   276
   * @param namespaceURI the default namespace uri
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   277
   * @return the Namespace with the specified value
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   278
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   279
  public abstract Namespace createNamespace(String namespaceURI);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   280
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   281
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   282
   * Create a new Namespace
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   283
   * @param prefix the prefix of this namespace, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   284
   * @param namespaceUri the attribute value is set to this value, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   285
   * @return the Namespace with the specified values
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   286
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   287
  public abstract Namespace createNamespace(String prefix, String namespaceUri);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   288
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   289
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   290
   * Create a new StartElement.  Namespaces can be added to this StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   291
   * by passing in an Iterator that walks over a set of Namespace interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   292
   * Attributes can be added to this StartElement by passing an iterator
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   293
   * that walks over a set of Attribute interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   294
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   295
   * @param name the qualified name of the attribute, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   296
   * @param attributes an optional unordered set of objects that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   297
   * implement Attribute to add to the new StartElement, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   298
   * @param namespaces an optional unordered set of objects that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   299
   * implement Namespace to add to the new StartElement, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   300
   * @return an instance of the requested StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   301
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   302
  public abstract StartElement createStartElement(QName name,
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 42390
diff changeset
   303
                                                  Iterator<? extends Attribute> attributes,
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 42390
diff changeset
   304
                                                  Iterator<? extends Namespace> namespaces);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   305
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   306
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   307
   * Create a new StartElement.  This defaults the NamespaceContext to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   308
   * an empty NamespaceContext.  Querying this event for its namespaces or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   309
   * attributes will result in an empty iterator being returned.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   310
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   311
   * @param namespaceUri the uri of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   312
   * @param localName the local name of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   313
   * @param prefix the prefix of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   314
   * @return an instance of the requested StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   315
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   316
  public abstract StartElement createStartElement(String prefix,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   317
                                                  String namespaceUri,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   318
                                                  String localName);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   319
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   320
   * Create a new StartElement.  Namespaces can be added to this StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   321
   * by passing in an Iterator that walks over a set of Namespace interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   322
   * Attributes can be added to this StartElement by passing an iterator
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   323
   * that walks over a set of Attribute interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   324
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   325
   * @param namespaceUri the uri of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   326
   * @param localName the local name of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   327
   * @param prefix the prefix of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   328
   * @param attributes an unordered set of objects that implement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   329
   * Attribute to add to the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   330
   * @param namespaces an unordered set of objects that implement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   331
   * Namespace to add to the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   332
   * @return an instance of the requested StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   333
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   334
  public abstract StartElement createStartElement(String prefix,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   335
                                                  String namespaceUri,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   336
                                                  String localName,
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 42390
diff changeset
   337
                                                  Iterator<? extends Attribute> attributes,
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 42390
diff changeset
   338
                                                  Iterator<? extends Namespace> namespaces
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   339
                                                  );
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   340
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   341
   * Create a new StartElement.  Namespaces can be added to this StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   342
   * by passing in an Iterator that walks over a set of Namespace interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   343
   * Attributes can be added to this StartElement by passing an iterator
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   344
   * that walks over a set of Attribute interfaces.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   345
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   346
   * @param namespaceUri the uri of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   347
   * @param localName the local name of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   348
   * @param prefix the prefix of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   349
   * @param attributes an unordered set of objects that implement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   350
   * Attribute to add to the new StartElement, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   351
   * @param namespaces an unordered set of objects that implement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   352
   * Namespace to add to the new StartElement, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   353
   * @param context the namespace context of this element
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   354
   * @return an instance of the requested StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   355
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   356
  public abstract StartElement createStartElement(String prefix,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   357
                                                  String namespaceUri,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   358
                                                  String localName,
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 42390
diff changeset
   359
                                                  Iterator<? extends Attribute> attributes,
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 42390
diff changeset
   360
                                                  Iterator<? extends Namespace> namespaces,
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   361
                                                  NamespaceContext context
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   362
                                                  );
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   363
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   364
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   365
   * Create a new EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   366
   * @param name the qualified name of the EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   367
   * @param namespaces an optional unordered set of objects that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   368
   * implement Namespace that have gone out of scope, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   369
   * @return an instance of the requested EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   370
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   371
  public abstract EndElement createEndElement(QName name,
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 42390
diff changeset
   372
                                              Iterator<? extends Namespace> namespaces);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   373
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   374
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   375
   * Create a new EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   376
   * @param namespaceUri the uri of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   377
   * @param localName the local name of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   378
   * @param prefix the prefix of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   379
   * @return an instance of the requested EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   380
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   381
  public abstract EndElement createEndElement(String prefix,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   382
                                              String namespaceUri,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   383
                                              String localName);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   384
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   385
   * Create a new EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   386
   * @param namespaceUri the uri of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   387
   * @param localName the local name of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   388
   * @param prefix the prefix of the QName of the new StartElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   389
   * @param namespaces an unordered set of objects that implement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   390
   * Namespace that have gone out of scope, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   391
   * @return an instance of the requested EndElement
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   392
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   393
  public abstract EndElement createEndElement(String prefix,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   394
                                              String namespaceUri,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   395
                                              String localName,
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 42390
diff changeset
   396
                                              Iterator<? extends Namespace> namespaces);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   397
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   398
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   399
   * Create a Characters event, this method does not check if the content
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   400
   * is all whitespace.  To create a space event use #createSpace(String)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   401
   * @param content the string to create
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   402
   * @return a Characters event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   403
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   404
  public abstract Characters createCharacters(String content);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   405
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   406
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   407
   * Create a Characters event with the CData flag set to true
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   408
   * @param content the string to create
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   409
   * @return a Characters event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   410
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   411
  public abstract Characters createCData(String content);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   412
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   413
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   414
   * Create a Characters event with the isSpace flag set to true
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   415
   * @param content the content of the space to create
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   416
   * @return a Characters event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   417
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   418
  public abstract Characters createSpace(String content);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   419
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   420
   * Create an ignorable space
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   421
   * @param content the space to create
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   422
   * @return a Characters event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   423
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   424
  public abstract Characters createIgnorableSpace(String content);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   425
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   426
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   427
   * Creates a new instance of a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   428
   * @return a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   429
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   430
  public abstract StartDocument createStartDocument();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   431
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   432
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   433
   * Creates a new instance of a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   434
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   435
   * @param encoding the encoding style
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   436
   * @param version the XML version
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   437
   * @param standalone the status of standalone may be set to "true" or "false"
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   438
   * @return a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   439
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   440
  public abstract StartDocument createStartDocument(String encoding,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   441
                                                  String version,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   442
                                                  boolean standalone);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   443
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   444
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   445
   * Creates a new instance of a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   446
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   447
   * @param encoding the encoding style
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   448
   * @param version the XML version
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   449
   * @return a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   450
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   451
  public abstract StartDocument createStartDocument(String encoding,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   452
                                                  String version);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   453
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   454
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   455
   * Creates a new instance of a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   456
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   457
   * @param encoding the encoding style
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   458
   * @return a StartDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   459
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   460
  public abstract StartDocument createStartDocument(String encoding);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   461
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   462
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   463
   * Creates a new instance of an EndDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   464
   * @return an EndDocument event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   465
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   466
  public abstract EndDocument createEndDocument();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   467
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   468
  /** Creates a new instance of a EntityReference event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   469
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   470
   * @param name The name of the reference
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   471
   * @param declaration the declaration for the event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   472
   * @return an EntityReference event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   473
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   474
  public abstract EntityReference createEntityReference(String name,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   475
                                                        EntityDeclaration declaration);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   476
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   477
   * Create a comment
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   478
   * @param text The text of the comment
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   479
   * a Comment event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   480
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   481
  public abstract Comment createComment(String text);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   482
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   483
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   484
   * Create a processing instruction
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   485
   * @param target The target of the processing instruction
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   486
   * @param data The text of the processing instruction
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   487
   * @return a ProcessingInstruction event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   488
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   489
  public abstract ProcessingInstruction createProcessingInstruction(String target,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   490
                                                                   String data);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   491
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   492
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   493
   * Create a document type definition event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   494
   * This string contains the entire document type declaration that matches
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   495
   * the doctypedecl in the XML 1.0 specification
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   496
   * @param dtd the text of the document type definition
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   497
   * @return a DTD event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   498
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   499
  public abstract DTD createDTD(String dtd);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   500
}