/**
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */
/* Generated By:JJTree: Do not edit this line. ASTExplicitConstructorInvocation.java */

package net.sourceforge.pmd.lang.java.ast;

public class ASTExplicitConstructorInvocation extends AbstractJavaNode {
    public ASTExplicitConstructorInvocation(int id) {
        super(id);
    }

    public ASTExplicitConstructorInvocation(JavaParser p, int id) {
        super(p, id);
    }


    /**
     * Accept the visitor. *
     */
    public Object jjtAccept(JavaParserVisitor visitor, Object data) {
        return visitor.visit(this, data);
    }

    public int getArgumentCount() {
    	if (this.jjtGetNumChildren() == 1) {
    		return ((ASTArguments) this.jjtGetChild(0)).getArgumentCount();
    	} else {
    		return ((ASTArguments) this.jjtGetChild(1)).getArgumentCount();
    	}
    }

    private String thisOrSuper;

    public void setIsThis() {
        this.thisOrSuper = "this";
    }

    public void setIsSuper() {
        this.thisOrSuper = "super";
    }

    public boolean isThis() {
        return thisOrSuper != null && thisOrSuper.equals("this");
    }

    public boolean isSuper() {
        return thisOrSuper != null && thisOrSuper.equals("super");
    }
}
