01: /* Generated By:JJTree: Do not edit this line. ASTClassOrInterfaceBodyDeclaration.java */
02: package net.sourceforge.pmd.ast;
03:
04: public class ASTClassOrInterfaceBodyDeclaration extends SimpleJavaNode {
05:
06: public ASTClassOrInterfaceBodyDeclaration(int id) {
07: super (id);
08: }
09:
10: public ASTClassOrInterfaceBodyDeclaration(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 isAnonymousInnerClass() {
22: return jjtGetParent().jjtGetParent() instanceof ASTAllocationExpression;
23: }
24:
25: public boolean isEnumChild() {
26: return jjtGetParent().jjtGetParent() instanceof ASTEnumConstant;
27: }
28:
29: public void dump(String prefix) {
30: String isAnonyString = isAnonymousInnerClass() ? ": (anonymous inner class)"
31: : "";
32: System.out.println(toString(prefix) + isAnonyString);
33: dumpChildren(prefix);
34: }
35:
36: }
|