KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > pmd > ast > ASTClassOrInterfaceDeclaration


1 /* Generated By:JJTree: Do not edit this line. ASTClassOrInterfaceDeclaration.java */
2
3 package net.sourceforge.pmd.ast;
4
5 public class ASTClassOrInterfaceDeclaration extends AccessNode {
6     public ASTClassOrInterfaceDeclaration(int id) {
7         super(id);
8     }
9
10     public ASTClassOrInterfaceDeclaration(JavaParser p, int id) {
11         super(p, id);
12     }
13
14     /**
15      * Accept the visitor. *
16      */

17     public Object JavaDoc jjtAccept(JavaParserVisitor visitor, Object JavaDoc data) {
18         return visitor.visit(this, data);
19     }
20
21     public boolean isNested() {
22         return jjtGetParent() instanceof ASTClassOrInterfaceBodyDeclaration;
23     }
24
25     private boolean isInterface;
26
27     public boolean isInterface() {
28         return this.isInterface;
29     }
30
31     public void setInterface() {
32         this.isInterface = true;
33     }
34
35     public void dump(String JavaDoc prefix) {
36         String JavaDoc interfaceStr = isInterface ? "interface" : "class";
37         String JavaDoc innerStr = isNested() ? "(nested)" : "";
38         System.out.println(toString(prefix) + "(" + getImage() + ")(" + interfaceStr + ")" + innerStr);
39         dumpChildren(prefix);
40     }
41
42 }
43
Popular Tags