net.sourceforge.pmd.lang.rule.xpath
Class SaxonXPathRuleQuery

java.lang.Object
  extended by net.sourceforge.pmd.lang.rule.xpath.AbstractXPathRuleQuery
      extended by net.sourceforge.pmd.lang.rule.xpath.SaxonXPathRuleQuery
All Implemented Interfaces:
XPathRuleQuery

public class SaxonXPathRuleQuery
extends AbstractXPathRuleQuery

This 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
SaxonXPathRuleQuery()
           
 
Method Summary
 List<Node> evaluate(Node node, RuleContext data)
          Evaluate the XPath query against the given Node.
 boolean isSupportedVersion(String version)
          Subclasses should implement to indicate whether an XPath version is supported.
 
Methods inherited from class net.sourceforge.pmd.lang.rule.xpath.AbstractXPathRuleQuery
getRuleChainVisits, setProperties, setVersion, setXPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaxonXPathRuleQuery

public SaxonXPathRuleQuery()
Method Detail

isSupportedVersion

public boolean isSupportedVersion(String version)
Subclasses should implement to indicate whether an XPath version is supported.

Specified by:
isSupportedVersion in class AbstractXPathRuleQuery
Parameters:
version - The XPath version.
Returns:
true if the XPath version is supported, false otherwise.

evaluate

public List<Node> evaluate(Node node,
                           RuleContext data)
Evaluate the XPath query against the given Node.

Specified by:
evaluate in interface XPathRuleQuery
Specified by:
evaluate in class AbstractXPathRuleQuery
Parameters:
node - The Node.
data - The RuleContext.
Returns:
The matching Nodes.


Copyright © 2002-2015 InfoEther. All Rights Reserved.