src/java.xml/share/classes/javax/xml/xpath/XPathFactory.java

Print this page




 100                         + DEFAULT_OBJECT_MODEL_URI
 101                         + " with the XPathFactoryConfigurationException: "
 102                         + xpathFactoryConfigurationException.toString()
 103                 );
 104         }
 105     }
 106 
 107     /**
 108     * <p>Get a new <code>XPathFactory</code> instance using the specified object model.</p>
 109     *
 110     * <p>To find a <code>XPathFactory</code> object,
 111     * this method looks the following places in the following order where "the class loader" refers to the context class loader:</p>
 112     * <ol>
 113     *   <li>
 114     *     If the system property {@link #DEFAULT_PROPERTY_NAME} + ":uri" is present,
 115     *     where uri is the parameter to this method, then its value is read as a class name.
 116     *     The method will try to create a new instance of this class by using the class loader,
 117     *     and returns it if it is successfully created.
 118     *   </li>
 119     *   <li>
 120     *     ${java.home}/conf/jaxp.properties is read and the value associated with the key being the system property above is looked for.
 121     *     If present, the value is processed just like above.
 122     *   </li>
 123     *   <li>
 124     *     Use the service-provider loading facilities, defined by the
 125     *     {@link java.util.ServiceLoader} class, to attempt to locate and load an
 126     *     implementation of the service using the {@linkplain
 127     *     java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
 128     *     the service-provider loading facility will use the {@linkplain
 129     *     java.lang.Thread#getContextClassLoader() current thread's context class loader}
 130     *     to attempt to load the service. If the context class
 131     *     loader is null, the {@linkplain
 132     *     ClassLoader#getSystemClassLoader() system class loader} will be used.
 133     *     <br>
 134     *     Each potential service provider is required to implement the method
 135     *     {@link #isObjectModelSupported(String objectModel)}.
 136     *     The first service provider found that supports the specified object
 137     *     model is returned.
 138     *     <br>
 139     *     In case of {@link java.util.ServiceConfigurationError} an
 140     *     {@link XPathFactoryConfigurationException} will be thrown.




 100                         + DEFAULT_OBJECT_MODEL_URI
 101                         + " with the XPathFactoryConfigurationException: "
 102                         + xpathFactoryConfigurationException.toString()
 103                 );
 104         }
 105     }
 106 
 107     /**
 108     * <p>Get a new <code>XPathFactory</code> instance using the specified object model.</p>
 109     *
 110     * <p>To find a <code>XPathFactory</code> object,
 111     * this method looks the following places in the following order where "the class loader" refers to the context class loader:</p>
 112     * <ol>
 113     *   <li>
 114     *     If the system property {@link #DEFAULT_PROPERTY_NAME} + ":uri" is present,
 115     *     where uri is the parameter to this method, then its value is read as a class name.
 116     *     The method will try to create a new instance of this class by using the class loader,
 117     *     and returns it if it is successfully created.
 118     *   </li>
 119     *   <li>
 120     *     ${java.home}/lib/jaxp.properties is read and the value associated with the key being the system property above is looked for.
 121     *     If present, the value is processed just like above.
 122     *   </li>
 123     *   <li>
 124     *     Use the service-provider loading facilities, defined by the
 125     *     {@link java.util.ServiceLoader} class, to attempt to locate and load an
 126     *     implementation of the service using the {@linkplain
 127     *     java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
 128     *     the service-provider loading facility will use the {@linkplain
 129     *     java.lang.Thread#getContextClassLoader() current thread's context class loader}
 130     *     to attempt to load the service. If the context class
 131     *     loader is null, the {@linkplain
 132     *     ClassLoader#getSystemClassLoader() system class loader} will be used.
 133     *     <br>
 134     *     Each potential service provider is required to implement the method
 135     *     {@link #isObjectModelSupported(String objectModel)}.
 136     *     The first service provider found that supports the specified object
 137     *     model is returned.
 138     *     <br>
 139     *     In case of {@link java.util.ServiceConfigurationError} an
 140     *     {@link XPathFactoryConfigurationException} will be thrown.