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. ASTExplicitConstructorInvocation.java */
5   
6   package net.sourceforge.pmd.lang.java.ast;
7   
8   public class ASTExplicitConstructorInvocation extends AbstractJavaNode {
9       public ASTExplicitConstructorInvocation(int id) {
10          super(id);
11      }
12  
13      public ASTExplicitConstructorInvocation(JavaParser p, int id) {
14          super(p, id);
15      }
16  
17  
18      /**
19       * Accept the visitor. *
20       */
21      public Object jjtAccept(JavaParserVisitor visitor, Object data) {
22          return visitor.visit(this, data);
23      }
24  
25      public int getArgumentCount() {
26      	if (this.jjtGetNumChildren() == 1) {
27      		return ((ASTArguments) this.jjtGetChild(0)).getArgumentCount();
28      	} else {
29      		return ((ASTArguments) this.jjtGetChild(1)).getArgumentCount();
30      	}
31      }
32  
33      private String thisOrSuper;
34  
35      public void setIsThis() {
36          this.thisOrSuper = "this";
37      }
38  
39      public void setIsSuper() {
40          this.thisOrSuper = "super";
41      }
42  
43      public boolean isThis() {
44          return thisOrSuper != null && thisOrSuper.equals("this");
45      }
46  
47      public boolean isSuper() {
48          return thisOrSuper != null && thisOrSuper.equals("super");
49      }
50  }