01: /* Generated By:JJTree: Do not edit this line. ASTClassOrInterfaceDeclaration.java */
02:
03: package net.sourceforge.pmd.ast;
04:
05: public class ASTClassOrInterfaceDeclaration extends
06: SimpleJavaAccessTypeNode {
07: public ASTClassOrInterfaceDeclaration(int id) {
08: super (id);
09: }
10:
11: public ASTClassOrInterfaceDeclaration(JavaParser p, int id) {
12: super (p, id);
13: }
14:
15: /**
16: * Accept the visitor. *
17: */
18: public Object jjtAccept(JavaParserVisitor visitor, Object data) {
19: return visitor.visit(this , data);
20: }
21:
22: public boolean isNested() {
23: return jjtGetParent() instanceof ASTClassOrInterfaceBodyDeclaration;
24: }
25:
26: private boolean isInterface;
27:
28: public boolean isInterface() {
29: return this .isInterface;
30: }
31:
32: public void setInterface() {
33: this .isInterface = true;
34: }
35:
36: public void dump(String prefix) {
37: String interfaceStr = isInterface ? "interface" : "class";
38: String innerStr = isNested() ? "(nested)" : "";
39: System.out.println(toString(prefix) + "(" + getImage() + ")("
40: + interfaceStr + ")" + innerStr);
41: dumpChildren(prefix);
42: }
43: }
|