|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.CommonAbstractRule
net.sourceforge.pmd.rules.XPathRule
Rule that tries to match an XPath expression against a DOM view of the AST of a "compilation unit".
This rule needs a property "xpath".
Field Summary |
Fields inherited from class net.sourceforge.pmd.CommonAbstractRule |
description, example, externalInfoUrl, include, message, name, priority, properties, ruleSetName, usesDFA |
Fields inherited from interface net.sourceforge.pmd.Rule |
LOWEST_PRIORITY, PRIORITIES |
Constructor Summary | |
XPathRule()
|
Method Summary | |
void |
apply(java.util.List astCompilationUnits,
RuleContext ctx)
Apply the rule to all compilation units. |
void |
evaluate(Node compilationUnit,
RuleContext data)
Evaluate the AST with compilationUnit as root-node, against the XPath expression found as property with name "xpath". |
Methods inherited from class net.sourceforge.pmd.CommonAbstractRule |
addProperties, addProperty, addViolation, addViolation, addViolation, addViolationWithMessage, equals, getBooleanProperty, getDescription, getDoubleProperty, getExample, getExternalInfoUrl, getIntProperty, getMessage, getName, getPriority, getPriorityName, getProperties, getRuleSetName, getStringProperty, hashCode, hasProperty, include, setDescription, setExample, setExternalInfoUrl, setInclude, setMessage, setName, setPriority, setRuleSetName, setUsesDFA, usesDFA |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XPathRule()
Method Detail |
public void evaluate(Node compilationUnit, RuleContext data)
compilationUnit
- the Node that is the root of the AST to be checkeddata
-
public void apply(java.util.List astCompilationUnits, RuleContext ctx)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |