001//
002// Generated by JTB 1.3.2
003//
004
005package jtb.syntaxtree;
006
007// Grammar production:
008// f0 -> [ TypeParameters() ]
009// f1 -> <IDENTIFIER>
010// f2 -> FormalParameters()
011// f3 -> [ "throws" NameList() ]
012// f4 -> "{"
013// f5 -> [ ExplicitConstructorInvocation() ]
014// f6 -> ( BlockStatement() )*
015// f7 -> "}"
016public class ConstructorDeclaration implements Node {
017   // This was added after running jtb to remove serializable warning.
018   static final long serialVersionUID = 20150406L;
019
020   private Node parent;
021   public NodeOptional f0;
022   public NodeToken f1;
023   public FormalParameters f2;
024   public NodeOptional f3;
025   public NodeToken f4;
026   public NodeOptional f5;
027   public NodeListOptional f6;
028   public NodeToken f7;
029
030   public ConstructorDeclaration(NodeOptional n0, NodeToken n1, FormalParameters n2, NodeOptional n3, NodeToken n4, NodeOptional n5, NodeListOptional n6, NodeToken n7) {
031      f0 = n0;
032      if ( f0 != null ) f0.setParent(this);
033      f1 = n1;
034      if ( f1 != null ) f1.setParent(this);
035      f2 = n2;
036      if ( f2 != null ) f2.setParent(this);
037      f3 = n3;
038      if ( f3 != null ) f3.setParent(this);
039      f4 = n4;
040      if ( f4 != null ) f4.setParent(this);
041      f5 = n5;
042      if ( f5 != null ) f5.setParent(this);
043      f6 = n6;
044      if ( f6 != null ) f6.setParent(this);
045      f7 = n7;
046      if ( f7 != null ) f7.setParent(this);
047   }
048
049   public ConstructorDeclaration(NodeOptional n0, NodeToken n1, FormalParameters n2, NodeOptional n3, NodeOptional n4, NodeListOptional n5) {
050      f0 = n0;
051      if ( f0 != null ) f0.setParent(this);
052      f1 = n1;
053      if ( f1 != null ) f1.setParent(this);
054      f2 = n2;
055      if ( f2 != null ) f2.setParent(this);
056      f3 = n3;
057      if ( f3 != null ) f3.setParent(this);
058      f4 = new NodeToken("{");
059      if ( f4 != null ) f4.setParent(this);
060      f5 = n4;
061      if ( f5 != null ) f5.setParent(this);
062      f6 = n5;
063      if ( f6 != null ) f6.setParent(this);
064      f7 = new NodeToken("}");
065      if ( f7 != null ) f7.setParent(this);
066   }
067
068   public void accept(jtb.visitor.Visitor v) {
069      v.visit(this);
070   }
071   public <R,A> R accept(jtb.visitor.GJVisitor<R,A> v, A argu) {
072      return v.visit(this,argu);
073   }
074   public <R> R accept(jtb.visitor.GJNoArguVisitor<R> v) {
075      return v.visit(this);
076   }
077   public <A> void accept(jtb.visitor.GJVoidVisitor<A> v, A argu) {
078      v.visit(this,argu);
079   }
080   public void setParent(Node n) { parent = n; }
081   public Node getParent()       { return parent; }
082}
083