View Javadoc

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    /*** Accept the visitor. **/
15    public Object jjtAccept(JavaParserVisitor visitor, Object data) {
16      return visitor.visit(this, data);
17    }
18  
19      public boolean isNested() {
20          return jjtGetParent() instanceof ASTClassOrInterfaceBodyDeclaration;    
21      }
22  
23      private boolean isInterface;
24  
25      public boolean isInterface() {
26          return this.isInterface;
27      }
28  
29      public void setInterface() {
30          this.isInterface = true;
31      }
32  
33      public void dump(String prefix) {
34          String interfaceStr = isInterface ? "interface" : "class";
35          String innerStr = isNested() ? "(nested)" : "";
36          System.out.println(toString(prefix) + "(" + getImage() + ")(" + interfaceStr  + ")" + innerStr);
37          dumpChildren(prefix);
38      }
39  
40  }