//
// Generated by JTB 1.2.1
//

package jde.parser.syntaxtree;

/**
 * Grammar production:
 * <PRE>
 * nodeOptional -> [ "public" | "protected" | "private" ]
 * nodeToken -> &lt;IDENTIFIER&gt;
 * formalParameters -> FormalParameters()
 * nodeOptional1 -> [ "throws" NameList() ]
 * nodeToken1 -> "{"
 * nodeOptional2 -> [ ExplicitConstructorInvocation() ]
 * nodeListOptional -> ( BlockStatement() )*
 * nodeToken2 -> "}"
 * </PRE>
 */
public class ConstructorDeclaration implements Node {
   private Node parent;
   public NodeOptional nodeOptional;
   public NodeToken nodeToken;
   public FormalParameters formalParameters;
   public NodeOptional nodeOptional1;
   public NodeToken nodeToken1;
   public NodeOptional nodeOptional2;
   public NodeListOptional nodeListOptional;
   public NodeToken nodeToken2;

   public ConstructorDeclaration(NodeOptional n0, NodeToken n1, FormalParameters n2, NodeOptional n3, NodeToken n4, NodeOptional n5, NodeListOptional n6, NodeToken n7) {
      nodeOptional = n0;
      if ( nodeOptional != null ) nodeOptional.setParent(this);
      nodeToken = n1;
      if ( nodeToken != null ) nodeToken.setParent(this);
      formalParameters = n2;
      if ( formalParameters != null ) formalParameters.setParent(this);
      nodeOptional1 = n3;
      if ( nodeOptional1 != null ) nodeOptional1.setParent(this);
      nodeToken1 = n4;
      if ( nodeToken1 != null ) nodeToken1.setParent(this);
      nodeOptional2 = n5;
      if ( nodeOptional2 != null ) nodeOptional2.setParent(this);
      nodeListOptional = n6;
      if ( nodeListOptional != null ) nodeListOptional.setParent(this);
      nodeToken2 = n7;
      if ( nodeToken2 != null ) nodeToken2.setParent(this);
   }

   public ConstructorDeclaration(NodeOptional n0, NodeToken n1, FormalParameters n2, NodeOptional n3, NodeOptional n4, NodeListOptional n5) {
      nodeOptional = n0;
      if ( nodeOptional != null ) nodeOptional.setParent(this);
      nodeToken = n1;
      if ( nodeToken != null ) nodeToken.setParent(this);
      formalParameters = n2;
      if ( formalParameters != null ) formalParameters.setParent(this);
      nodeOptional1 = n3;
      if ( nodeOptional1 != null ) nodeOptional1.setParent(this);
      nodeToken1 = new NodeToken("{");
      if ( nodeToken1 != null ) nodeToken1.setParent(this);
      nodeOptional2 = n4;
      if ( nodeOptional2 != null ) nodeOptional2.setParent(this);
      nodeListOptional = n5;
      if ( nodeListOptional != null ) nodeListOptional.setParent(this);
      nodeToken2 = new NodeToken("}");
      if ( nodeToken2 != null ) nodeToken2.setParent(this);
   }

   public void accept(jde.parser.visitor.Visitor v) {
      v.visit(this);
   }
   public Object accept(jde.parser.visitor.ObjectVisitor v, Object argu) {
      return v.visit(this,argu);
   }
   public void setParent(Node n) { parent = n; }
   public Node getParent()       { return parent; }
}

