01: /* Generated By:JJTree: Do not edit this line. ASTClassOrInterfaceDeclaration.java */
02:
03: package net.sourceforge.pmd.ast;
04:
05: public class ASTClassOrInterfaceDeclaration extends AccessNode {
06: public ASTClassOrInterfaceDeclaration(int id) {
07: super (id);
08: }
09:
10: public ASTClassOrInterfaceDeclaration(JavaParser p, int id) {
11: super (p, id);
12: }
13:
14: /**
15: * Accept the visitor. *
16: */
17: public Object jjtAccept(JavaParserVisitor visitor, Object 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 prefix) {
36: String interfaceStr = isInterface ? "interface" : "class";
37: String innerStr = isNested() ? "(nested)" : "";
38: System.out.println(toString(prefix) + "(" + getImage() + ")("
39: + interfaceStr + ")" + innerStr);
40: dumpChildren(prefix);
41: }
42:
43: }
|