220 * </li> |
220 * </li> |
221 * <li> |
221 * <li> |
222 * If {@code factoryId} is "javax.xml.stream.XMLOutputFactory", |
222 * If {@code factoryId} is "javax.xml.stream.XMLOutputFactory", |
223 * use the service-provider loading facilities, defined by the |
223 * use the service-provider loading facilities, defined by the |
224 * {@link java.util.ServiceLoader} class, to attempt to locate and load an |
224 * {@link java.util.ServiceLoader} class, to attempt to locate and load an |
225 * implementation of the service using the {@linkplain |
225 * implementation of the service using the specified {@code ClassLoader}. |
226 * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}: |
226 * If {@code classLoader} is null, the {@linkplain |
227 * the service-provider loading facility will use the {@linkplain |
227 * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism} will apply: |
|
228 * That is, the service-provider loading facility will use the {@linkplain |
228 * java.lang.Thread#getContextClassLoader() current thread's context class loader} |
229 * java.lang.Thread#getContextClassLoader() current thread's context class loader} |
229 * to attempt to load the service. If the context class |
230 * to attempt to load the service. If the context class |
230 * loader is null, the {@linkplain |
231 * loader is null, the {@linkplain |
231 * ClassLoader#getSystemClassLoader() system class loader} will be used. |
232 * ClassLoader#getSystemClassLoader() system class loader} will be used. |
232 * </li> |
233 * </li> |
233 * <li> |
234 * <li> |
234 * Otherwise, throws a {@link FactoryConfigurationError}. |
235 * Otherwise, throws a {@link FactoryConfigurationError}. |
235 * </li> |
236 * </li> |
236 * </ul> |
237 * </ul> |
|
238 * |
|
239 * @apiNote The parameter factoryId defined here is inconsistent with that |
|
240 * of other JAXP factories where the first parameter is fully qualified |
|
241 * factory class name that provides implementation of the factory. |
237 * |
242 * |
238 * <p> |
243 * <p> |
239 * Note that this is a new method that replaces the deprecated |
244 * Note that this is a new method that replaces the deprecated |
240 * {@link #newInstance(java.lang.String, java.lang.ClassLoader) |
245 * {@link #newInstance(java.lang.String, java.lang.ClassLoader) |
241 * newInstance(String factoryId, ClassLoader classLoader)} method. |
246 * newInstance(String factoryId, ClassLoader classLoader)} method. |