net.sourceforge.pmd

Class RuleChain

public class RuleChain extends Object

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.
Method Summary
voidadd(RuleSet ruleSet)
Add all Rules from the given RuleSet which want to participate in the RuleChain.
voidapply(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.

Method Detail

add

public void add(RuleSet ruleSet)
Add all Rules from the given RuleSet which want to participate in the RuleChain.

Parameters: ruleSet The RuleSet to add Rules from.

apply

public void apply(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.

Parameters: astCompilationUnits The ASTCompilationUnits. ctx The RuleContext. language The Language.