Class XPathEvaluator
- java.lang.Object
-
- net.sourceforge.pmd.util.fxdesigner.model.XPathEvaluator
-
public final class XPathEvaluator extends java.lang.Object
Evaluates XPath expressions.- Since:
- 6.0.0
- Author:
- Clément Fournier
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<net.sourceforge.pmd.lang.ast.Node>
evaluateQuery(net.sourceforge.pmd.lang.ast.Node compilationUnit, net.sourceforge.pmd.lang.LanguageVersion languageVersion, java.lang.String xpathVersion, java.lang.String xpathQuery, java.util.List<PropertyDescriptorSpec> properties)
Evaluates an XPath query on the compilation unit.static java.util.List<net.sourceforge.pmd.lang.ast.Node>
simpleEvaluate(DesignerRoot root, java.lang.String query)
Evaluates the query with default parameters on the global compilation unit and with the global language version.
-
-
-
Method Detail
-
simpleEvaluate
public static java.util.List<net.sourceforge.pmd.lang.ast.Node> simpleEvaluate(DesignerRoot root, java.lang.String query)
Evaluates the query with default parameters on the global compilation unit and with the global language version. This method hides errors.- Returns:
- The results, or an empty list if there was an error
-
evaluateQuery
public static java.util.List<net.sourceforge.pmd.lang.ast.Node> evaluateQuery(net.sourceforge.pmd.lang.ast.Node compilationUnit, net.sourceforge.pmd.lang.LanguageVersion languageVersion, java.lang.String xpathVersion, java.lang.String xpathQuery, java.util.List<PropertyDescriptorSpec> properties) throws XPathEvaluationException
Evaluates an XPath query on the compilation unit. Performs no side effects.- Parameters:
compilationUnit
- AST rootlanguageVersion
- language versionxpathVersion
- XPath versionxpathQuery
- XPath queryproperties
- Properties of the rule- Throws:
XPathEvaluationException
- if there was an error during the evaluation. The cause is preserved
-
-