1 package net.sourceforge.pmd;
2
3 import java.util.List;
4
5 import net.sourceforge.pmd.ast.CompilationUnit;
6
7 /**
8 * The RuleChainVisitor understands how to visit an AST for a particular
9 * Language.
10 */
11 public interface RuleChainVisitor {
12 /**
13 * Add the given rule to the visitor.
14 *
15 * @param ruleSet
16 * The RuleSet to which the rule belongs.
17 * @param rule
18 * The rule to add.
19 */
20 void add(RuleSet ruleSet, Rule rule);
21
22 /**
23 * Visit all the given ASTCompilationUnits provided using the given
24 * RuleContext. Every Rule added will visit the AST as appropriate.
25 *
26 * @param astCompilationUnits
27 * The ASTCompilationUnits to visit.
28 * @param ctx
29 * The RuleContext.
30 */
31 void visitAll(List<CompilationUnit> astCompilationUnits, RuleContext ctx);
32 }