KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > pmd > util > designer > DFAGraphRule


1 package net.sourceforge.pmd.util.designer;
2
3 import net.sourceforge.pmd.AbstractRule;
4 import net.sourceforge.pmd.ast.ASTCompilationUnit;
5 import net.sourceforge.pmd.ast.ASTMethodDeclaration;
6
7 import java.util.List JavaDoc;
8
9 public class DFAGraphRule extends AbstractRule {
10
11     private List JavaDoc methods;
12     private List JavaDoc constructors;
13
14     public DFAGraphRule() {
15         super.setUsesDFA();
16     }
17
18     public List JavaDoc getMethods() {
19         return this.methods;
20     }
21
22     public List JavaDoc getConstructors() {
23         return this.constructors;
24     }
25
26     public Object JavaDoc visit(ASTCompilationUnit acu, Object JavaDoc data) {
27         methods = acu.findChildrenOfType(ASTMethodDeclaration.class);
28         constructors = acu.findChildrenOfType(ASTMethodDeclaration.class);
29         return data;
30     }
31 }
32
33
34
Popular Tags