Class SaxonXPathRuleQuery
- java.lang.Object
-
- net.sourceforge.pmd.lang.rule.xpath.AbstractXPathRuleQuery
-
- net.sourceforge.pmd.lang.rule.xpath.SaxonXPathRuleQuery
-
- All Implemented Interfaces:
XPathRuleQuery
@Deprecated @InternalApi public class SaxonXPathRuleQuery extends AbstractXPathRuleQuery
Deprecated.Internal APIThis is a Saxon based XPathRule query.
-
-
Field Summary
-
Fields inherited from class net.sourceforge.pmd.lang.rule.xpath.AbstractXPathRuleQuery
properties, ruleChainVisits, version, xpath
-
Fields inherited from interface net.sourceforge.pmd.lang.rule.xpath.XPathRuleQuery
XPATH_1_0, XPATH_1_0_COMPATIBILITY, XPATH_2_0
-
-
Constructor Summary
Constructors Constructor Description SaxonXPathRuleQuery()
Deprecated.SaxonXPathRuleQuery(net.sourceforge.pmd.lang.ast.xpath.internal.DeprecatedAttrLogger attrCtx)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<Node>
evaluate(Node node, RuleContext data)
Deprecated.Evaluate the XPath query against the given Node.static net.sf.saxon.value.AtomicValue
getAtomicRepresentation(Object value)
Deprecated.Gets the Saxon representation of the parameter, if its type corresponds to an XPath 2.0 atomic datatype.static net.sf.saxon.om.NamePool
getNamePool()
Deprecated.static net.sf.saxon.om.ValueRepresentation
getRepresentation(PropertyDescriptor<?> descriptor, Object value)
Deprecated.Internal: this has been moved in PMD 7.List<String>
getRuleChainVisits()
Deprecated.Indicates which AST Nodes (if any) should be used with the RuleChain.static net.sf.saxon.value.Value
getSequenceRepresentation(List<?> list)
Deprecated.boolean
isSupportedVersion(String version)
Deprecated.Subclasses should implement to indicate whether an XPath version is supported.-
Methods inherited from class net.sourceforge.pmd.lang.rule.xpath.AbstractXPathRuleQuery
setProperties, setVersion, setXPath
-
-
-
-
Constructor Detail
-
SaxonXPathRuleQuery
@Deprecated public SaxonXPathRuleQuery()
Deprecated.
-
SaxonXPathRuleQuery
public SaxonXPathRuleQuery(net.sourceforge.pmd.lang.ast.xpath.internal.DeprecatedAttrLogger attrCtx)
Deprecated.
-
-
Method Detail
-
isSupportedVersion
public boolean isSupportedVersion(String version)
Deprecated.Description copied from class:AbstractXPathRuleQuery
Subclasses should implement to indicate whether an XPath version is supported.- Specified by:
isSupportedVersion
in classAbstractXPathRuleQuery
- Parameters:
version
- The XPath version.- Returns:
true
if the XPath version is supported,false
otherwise.
-
evaluate
public List<Node> evaluate(Node node, RuleContext data)
Deprecated.Description copied from interface:XPathRuleQuery
Evaluate the XPath query against the given Node.- Specified by:
evaluate
in interfaceXPathRuleQuery
- Specified by:
evaluate
in classAbstractXPathRuleQuery
- Parameters:
node
- The Node.data
- The RuleContext.- Returns:
- The matching Nodes.
-
getRepresentation
@InternalApi public static net.sf.saxon.om.ValueRepresentation getRepresentation(PropertyDescriptor<?> descriptor, Object value)
Deprecated.Internal: this has been moved in PMD 7.
-
getAtomicRepresentation
public static net.sf.saxon.value.AtomicValue getAtomicRepresentation(Object value)
Deprecated.Gets the Saxon representation of the parameter, if its type corresponds to an XPath 2.0 atomic datatype.- Parameters:
value
- The value to convert- Returns:
- The converted AtomicValue
-
getSequenceRepresentation
public static net.sf.saxon.value.Value getSequenceRepresentation(List<?> list)
Deprecated.
-
getRuleChainVisits
public List<String> getRuleChainVisits()
Deprecated.Description copied from interface:XPathRuleQuery
Indicates which AST Nodes (if any) should be used with the RuleChain. Use of the RuleChain will allow the query execute on a targeted sub-tree of the AST, instead of the entire AST from the root. This can result in great performance benefits.- Specified by:
getRuleChainVisits
in interfaceXPathRuleQuery
- Overrides:
getRuleChainVisits
in classAbstractXPathRuleQuery
-
getNamePool
public static net.sf.saxon.om.NamePool getNamePool()
Deprecated.
-
-