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