View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   /* Generated By:JJTree: Do not edit this line. ASTPrimitiveType.java */
5   
6   package net.sourceforge.pmd.lang.java.ast;
7   
8   public class ASTPrimitiveType extends AbstractJavaTypeNode implements Dimensionable {
9   
10      public ASTPrimitiveType(int id) {
11          super(id);
12      }
13  
14      public ASTPrimitiveType(JavaParser p, int id) {
15          super(p, id);
16      }
17  
18      public boolean isBoolean() {
19          return getImage().equals("boolean");
20      }
21  
22      /**
23       * Accept the visitor. *
24       */
25      public Object jjtAccept(JavaParserVisitor visitor, Object data) {
26          return visitor.visit(this, data);
27      }
28  
29      private int arrayDepth;
30  
31      public void bumpArrayDepth() {
32          arrayDepth++;
33      }
34  
35      public int getArrayDepth() {
36          return arrayDepth;
37      }
38  
39      public boolean isArray() {
40          return arrayDepth > 0;
41      }
42  
43  }