28 import com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl; 29 import jdk.xml.internal.SecuritySupport; 30 31 /** 32 * <p>An {@code XPathFactory} instance can be used to create 33 * {@link javax.xml.xpath.XPath} objects.</p> 34 * 35 *<p>See {@link #newInstance(String uri)} for lookup mechanism.</p> 36 * 37 * <p>The {@link XPathFactory} class is not thread-safe. In other words, 38 * it is the application's responsibility to ensure that at most 39 * one thread is using a {@link XPathFactory} object at any 40 * given moment. Implementations are encouraged to mark methods 41 * as <code>synchronized</code> to protect themselves from broken clients. 42 * 43 * <p>{@link XPathFactory} is not re-entrant. While one of the 44 * <code>newInstance</code> methods is being invoked, applications 45 * may not attempt to recursively invoke a <code>newInstance</code> method, 46 * even from the same thread. 47 * 48 * @author <a href="mailto:Norman.Walsh@Sun.com">Norman Walsh</a> 49 * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a> 50 * 51 * @since 1.5 52 */ 53 public abstract class XPathFactory { 54 55 56 /** 57 * <p>The default property name according to the JAXP spec.</p> 58 */ 59 public static final String DEFAULT_PROPERTY_NAME = "javax.xml.xpath.XPathFactory"; 60 61 /** 62 * <p>Default Object Model URI.</p> 63 */ 64 public static final String DEFAULT_OBJECT_MODEL_URI = "http://java.sun.com/jaxp/xpath/dom"; 65 66 /** 67 * <p>Protected constructor as {@link #newInstance()} or {@link #newInstance(String uri)} 68 * or {@link #newInstance(String uri, String factoryClassName, ClassLoader classLoader)} 69 * should be used to create a new instance of an {@code XPathFactory}.</p> | 28 import com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl; 29 import jdk.xml.internal.SecuritySupport; 30 31 /** 32 * <p>An {@code XPathFactory} instance can be used to create 33 * {@link javax.xml.xpath.XPath} objects.</p> 34 * 35 *<p>See {@link #newInstance(String uri)} for lookup mechanism.</p> 36 * 37 * <p>The {@link XPathFactory} class is not thread-safe. In other words, 38 * it is the application's responsibility to ensure that at most 39 * one thread is using a {@link XPathFactory} object at any 40 * given moment. Implementations are encouraged to mark methods 41 * as <code>synchronized</code> to protect themselves from broken clients. 42 * 43 * <p>{@link XPathFactory} is not re-entrant. While one of the 44 * <code>newInstance</code> methods is being invoked, applications 45 * may not attempt to recursively invoke a <code>newInstance</code> method, 46 * even from the same thread. 47 * 48 * @author Norman Walsh 49 * @author Jeff Suttor 50 * 51 * @since 1.5 52 */ 53 public abstract class XPathFactory { 54 55 56 /** 57 * <p>The default property name according to the JAXP spec.</p> 58 */ 59 public static final String DEFAULT_PROPERTY_NAME = "javax.xml.xpath.XPathFactory"; 60 61 /** 62 * <p>Default Object Model URI.</p> 63 */ 64 public static final String DEFAULT_OBJECT_MODEL_URI = "http://java.sun.com/jaxp/xpath/dom"; 65 66 /** 67 * <p>Protected constructor as {@link #newInstance()} or {@link #newInstance(String uri)} 68 * or {@link #newInstance(String uri, String factoryClassName, ClassLoader classLoader)} 69 * should be used to create a new instance of an {@code XPathFactory}.</p> |