|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.RuleChain
public class RuleChain
The RuleChain is a means by which Rules can participate in a uniform visitation of the AST, and not need perform their own independent visitation. The RuleChain exists as a means to improve the speed of PMD when there are many Rules.
Constructor Summary | |
---|---|
RuleChain()
|
Method Summary | |
---|---|
void |
add(Language language,
Rule rule)
Add the given Rule if it wants to participate in the RuleChain. |
void |
add(RuleSet ruleSet)
Add all Rules from the given RuleSet which want to participate in the RuleChain. |
void |
apply(java.util.List<CompilationUnit> astCompilationUnits,
RuleContext ctx,
Language language)
Apply the RuleChain to the given ASTCompilationUnits using the given RuleContext, for those rules using the given Language. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RuleChain()
Method Detail |
---|
public void add(RuleSet ruleSet)
ruleSet
- The RuleSet to add Rules from.public void add(Language language, Rule rule)
language
- The Language used by the Rule.rule
- The Rule to add.public void apply(java.util.List<CompilationUnit> astCompilationUnits, RuleContext ctx, Language language)
astCompilationUnits
- The ASTCompilationUnits.ctx
- The RuleContext.language
- The Language.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |