View Javadoc

1   /* Generated By:JJTree: Do not edit this line. ASTExplicitConstructorInvocation.java */
2   
3   package net.sourceforge.pmd.lang.java.ast;
4   
5   public class ASTExplicitConstructorInvocation extends AbstractJavaNode {
6       public ASTExplicitConstructorInvocation(int id) {
7           super(id);
8       }
9   
10      public ASTExplicitConstructorInvocation(JavaParser p, int id) {
11          super(p, id);
12      }
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 int getArgumentCount() {
23      	if (this.jjtGetNumChildren() == 1) {
24      		return ((ASTArguments) this.jjtGetChild(0)).getArgumentCount();
25      	} else {
26      		return ((ASTArguments) this.jjtGetChild(1)).getArgumentCount();
27      	}
28      }
29  
30      private String thisOrSuper;
31  
32      public void setIsThis() {
33          this.thisOrSuper = "this";
34      }
35  
36      public void setIsSuper() {
37          this.thisOrSuper = "super";
38      }
39  
40      public boolean isThis() {
41          return thisOrSuper != null && thisOrSuper.equals("this");
42      }
43  
44      public boolean isSuper() {
45          return thisOrSuper != null && thisOrSuper.equals("super");
46      }
47  }