01: package net.sourceforge.pmd;
02:
03: import java.util.List;
04:
05: import net.sourceforge.pmd.ast.CompilationUnit;
06:
07: /**
08: * The RuleChainVisitor understands how to visit an AST for a particular
09: * Language.
10: */
11: public interface RuleChainVisitor {
12: /**
13: * Add the given rule to the visitor.
14: *
15: * @param rule
16: * The rule to add.
17: */
18: void add(Rule rule);
19:
20: /**
21: * Visit all the given ASTCompilationUnits provided using the given
22: * RuleContext. Every Rule added will visit the AST as appropriate.
23: *
24: * @param astCompilationUnits
25: * The ASTCompilationUnits to visit.
26: * @param ctx
27: * The RuleContext.
28: */
29: void visitAll(List<CompilationUnit> astCompilationUnits,
30: RuleContext ctx);
31: }
|