jaxp/src/java.xml/share/classes/javax/xml/stream/XMLOutputFactory.java
changeset 42802 2a03abb03c06
parent 42390 4083bc2c3b5b
child 44280 d299a23c65e2
equal deleted inserted replaced
42801:b6efd9c4f416 42802:2a03abb03c06
     1 /*
     1 /*
       
     2  * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  *
     4  *
     4  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     5  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    19  *
    20  *
    20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    21  * or visit www.oracle.com if you need additional information or have any
    22  * or visit www.oracle.com if you need additional information or have any
    22  * questions.
    23  * questions.
    23  */
       
    24 
       
    25 /*
       
    26  * Copyright (c) 2009, 2013, by Oracle Corporation. All Rights Reserved.
       
    27  */
    24  */
    28 
    25 
    29 package javax.xml.stream;
    26 package javax.xml.stream;
    30 
    27 
    31 import com.sun.xml.internal.stream.XMLOutputFactoryImpl;
    28 import com.sun.xml.internal.stream.XMLOutputFactoryImpl;
   119 
   116 
   120   static final String DEFAULIMPL = "com.sun.xml.internal.stream.XMLOutputFactoryImpl";
   117   static final String DEFAULIMPL = "com.sun.xml.internal.stream.XMLOutputFactoryImpl";
   121 
   118 
   122   protected XMLOutputFactory(){}
   119   protected XMLOutputFactory(){}
   123 
   120 
   124   /**
   121    /**
   125    * Creates a new instance of the {@code XMLOutputFactory} builtin
   122    * Creates a new instance of the {@code XMLOutputFactory} builtin
   126    * system-default implementation.
   123    * system-default implementation.
   127    *
   124    *
   128    * @return A new instance of the {@code XMLOutputFactory} builtin
   125    * @return A new instance of the {@code XMLOutputFactory} builtin
   129    *         system-default implementation.
   126    *         system-default implementation.
   223    * @deprecated  This method has been deprecated because it returns an
   220    * @deprecated  This method has been deprecated because it returns an
   224    *              instance of XMLInputFactory, which is of the wrong class.
   221    *              instance of XMLInputFactory, which is of the wrong class.
   225    *              Use the new method {@link #newFactory(java.lang.String,
   222    *              Use the new method {@link #newFactory(java.lang.String,
   226    *              java.lang.ClassLoader)} instead.
   223    *              java.lang.ClassLoader)} instead.
   227    */
   224    */
       
   225   @Deprecated(since="7")
   228   public static XMLInputFactory newInstance(String factoryId,
   226   public static XMLInputFactory newInstance(String factoryId,
   229           ClassLoader classLoader)
   227           ClassLoader classLoader)
   230           throws FactoryConfigurationError {
   228           throws FactoryConfigurationError {
   231       //do not fallback if given classloader can't find the class, throw exception
   229       //do not fallback if given classloader can't find the class, throw exception
   232       return FactoryFinder.find(XMLInputFactory.class, factoryId, classLoader, null);
   230       return FactoryFinder.find(XMLInputFactory.class, factoryId, classLoader, null);