246 * </li> |
246 * </li> |
247 * <li> |
247 * <li> |
248 * If {@code factoryId} is "javax.xml.stream.XMLInputFactory", |
248 * If {@code factoryId} is "javax.xml.stream.XMLInputFactory", |
249 * use the service-provider loading facilities, defined by the |
249 * use the service-provider loading facilities, defined by the |
250 * {@link java.util.ServiceLoader} class, to attempt to locate and load an |
250 * {@link java.util.ServiceLoader} class, to attempt to locate and load an |
251 * implementation of the service using the {@linkplain |
251 * implementation of the service using the specified {@code ClassLoader}. |
252 * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}: |
252 * If {@code classLoader} is null, the {@linkplain |
253 * the service-provider loading facility will use the {@linkplain |
253 * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism} will apply: |
|
254 * That is, the service-provider loading facility will use the {@linkplain |
254 * java.lang.Thread#getContextClassLoader() current thread's context class loader} |
255 * java.lang.Thread#getContextClassLoader() current thread's context class loader} |
255 * to attempt to load the service. If the context class |
256 * to attempt to load the service. If the context class |
256 * loader is null, the {@linkplain |
257 * loader is null, the {@linkplain |
257 * ClassLoader#getSystemClassLoader() system class loader} will be used. |
258 * ClassLoader#getSystemClassLoader() system class loader} will be used. |
258 * </li> |
259 * </li> |
266 * {@link #newInstance(java.lang.String, java.lang.ClassLoader) |
267 * {@link #newInstance(java.lang.String, java.lang.ClassLoader) |
267 * newInstance(String factoryId, ClassLoader classLoader)} method. |
268 * newInstance(String factoryId, ClassLoader classLoader)} method. |
268 * No changes in behavior are defined by this replacement method relative |
269 * No changes in behavior are defined by this replacement method relative |
269 * to the deprecated method. |
270 * to the deprecated method. |
270 * </p> |
271 * </p> |
|
272 * |
|
273 * @apiNote The parameter factoryId defined here is inconsistent with that |
|
274 * of other JAXP factories where the first parameter is fully qualified |
|
275 * factory class name that provides implementation of the factory. |
271 * |
276 * |
272 * @param factoryId Name of the factory to find, same as |
277 * @param factoryId Name of the factory to find, same as |
273 * a property name |
278 * a property name |
274 * @param classLoader classLoader to use |
279 * @param classLoader classLoader to use |
275 * @return the factory implementation |
280 * @return the factory implementation |