public class XPathFactoryImpl extends XPathFactory
DEFAULT_OBJECT_MODEL_URI, DEFAULT_PROPERTY_NAME
Constructor and Description |
---|
XPathFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
getFeature(String name)
Get the state of the named feature.
|
boolean |
isObjectModelSupported(String objectModel)
Is specified object model supported by this
XPathFactory ? |
XPath |
newXPath()
Returns a new
XPath object using the underlying
object model determined when the factory was instantiated. |
void |
setFeature(String name,
boolean value)
Set a feature for this
XPathFactory and
XPath s created by this factory. |
void |
setXPathFunctionResolver(XPathFunctionResolver resolver)
Establish a default function resolver.
|
void |
setXPathVariableResolver(XPathVariableResolver resolver)
Establish a default variable resolver.
|
newInstance, newInstance, newInstance
public boolean isObjectModelSupported(String objectModel)
Is specified object model supported by this
XPathFactory
?
isObjectModelSupported
in class XPathFactory
objectModel
- Specifies the object model which the returned
XPathFactory
will understand.true
if XPathFactory
supports
objectModel
, else false
.NullPointerException
- If objectModel
is null
.IllegalArgumentException
- If objectModel.length() == 0
.public XPath newXPath()
Returns a new XPath
object using the underlying
object model determined when the factory was instantiated.
newXPath
in class XPathFactory
XPath
public void setFeature(String name, boolean value) throws XPathFactoryConfigurationException
Set a feature for this XPathFactory
and
XPath
s created by this factory.
Feature names are fully qualified URI
s.
Implementations may define their own features.
An XPathFactoryConfigurationException
is thrown if this
XPathFactory
or the XPath
s
it creates cannot support the feature.
It is possible for an XPathFactory
to expose a feature
value but be unable to change its state.
See XPathFactory
for full documentation
of specific features.
setFeature
in class XPathFactory
name
- Feature name.value
- Is feature state true
or false
.XPathFactoryConfigurationException
- if this
XPathFactory
or the XPath
s
it creates cannot support this feature.NullPointerException
- if name
is
null
.public boolean getFeature(String name) throws XPathFactoryConfigurationException
Get the state of the named feature.
Feature names are fully qualified URI
s.
Implementations may define their own features.
An XPathFactoryConfigurationException
is thrown if this
XPathFactory
or the XPath
s
it creates cannot support the feature.
It is possible for an XPathFactory
to expose a feature
value but be unable to change its state.
getFeature
in class XPathFactory
name
- Feature name.XPathFactoryConfigurationException
- if this
XPathFactory
or the XPath
s
it creates cannot support this feature.NullPointerException
- if name
is
null
.public void setXPathFunctionResolver(XPathFunctionResolver resolver)
Establish a default function resolver.
Any XPath
objects constructed from this factory will use
the specified resolver by default.
A NullPointerException
is thrown if
resolver
is null
.
setXPathFunctionResolver
in class XPathFactory
resolver
- XPath function resolver.NullPointerException
- If resolver
is
null
.public void setXPathVariableResolver(XPathVariableResolver resolver)
Establish a default variable resolver.
Any XPath
objects constructed from this factory will use
the specified resolver by default.
A NullPointerException
is thrown if resolver
is null
.
setXPathVariableResolver
in class XPathFactory
resolver
- Variable resolver.NullPointerException
- If resolver
is
null
.Copyright © 2017 JBoss by Red Hat. All rights reserved.