001//
002// Generated by JTB 1.3.2
003//
004
005package jtb.syntaxtree;
006
007// Grammar production:
008// f0 -> [ TypeParameters() ]
009// f1 -> ResultType()
010// f2 -> MethodDeclarator()
011// f3 -> [ "throws" NameList() ]
012// f4 -> ( Block() | ";" )
013public class MethodDeclaration implements Node {
014   // This was added after running jtb to remove serializable warning.
015   static final long serialVersionUID = 20150406L;
016
017   private Node parent;
018   public NodeOptional f0;
019   public ResultType f1;
020   public MethodDeclarator f2;
021   public NodeOptional f3;
022   public NodeChoice f4;
023
024   public MethodDeclaration(NodeOptional n0, ResultType n1, MethodDeclarator n2, NodeOptional n3, NodeChoice n4) {
025      f0 = n0;
026      if ( f0 != null ) f0.setParent(this);
027      f1 = n1;
028      if ( f1 != null ) f1.setParent(this);
029      f2 = n2;
030      if ( f2 != null ) f2.setParent(this);
031      f3 = n3;
032      if ( f3 != null ) f3.setParent(this);
033      f4 = n4;
034      if ( f4 != null ) f4.setParent(this);
035   }
036
037   public void accept(jtb.visitor.Visitor v) {
038      v.visit(this);
039   }
040   public <R,A> R accept(jtb.visitor.GJVisitor<R,A> v, A argu) {
041      return v.visit(this,argu);
042   }
043   public <R> R accept(jtb.visitor.GJNoArguVisitor<R> v) {
044      return v.visit(this);
045   }
046   public <A> void accept(jtb.visitor.GJVoidVisitor<A> v, A argu) {
047      v.visit(this,argu);
048   }
049   public void setParent(Node n) { parent = n; }
050   public Node getParent()       { return parent; }
051}
052