net.sourceforge.pmd.lang.rule.xpath
Class JaxenXPathRuleQuery
java.lang.Object
net.sourceforge.pmd.lang.rule.xpath.AbstractXPathRuleQuery
net.sourceforge.pmd.lang.rule.xpath.JaxenXPathRuleQuery
- All Implemented Interfaces:
- XPathRuleQuery
public class JaxenXPathRuleQuery
- extends AbstractXPathRuleQuery
This is a Jaxen based XPathRule query.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JaxenXPathRuleQuery
public JaxenXPathRuleQuery()
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.
getRuleChainVisits
public List<String> getRuleChainVisits()
- Indicates which AST Nodes (if any) should be used with the RuleChain.
Use of the RuleChain will allow the query execute on a targed sub-tree
of the AST, instead of the entire AST from the root. This can result
in great performance benefits.
- Specified by:
getRuleChainVisits in interface XPathRuleQuery- Overrides:
getRuleChainVisits in class AbstractXPathRuleQuery
Copyright © 2002-2015 InfoEther. All Rights Reserved.