001// 002// Generated by JTB 1.3.2 003// 004 005package jtb.syntaxtree; 006 007// Grammar production: 008// f0 -> "import" 009// f1 -> [ "static" ] 010// f2 -> Name() 011// f3 -> [ "." "*" ] 012// f4 -> ";" 013public class ImportDeclaration 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 NodeToken f0; 019 public NodeOptional f1; 020 public Name f2; 021 public NodeOptional f3; 022 public NodeToken f4; 023 024 public ImportDeclaration(NodeToken n0, NodeOptional n1, Name n2, NodeOptional n3, NodeToken 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 ImportDeclaration(NodeOptional n0, Name n1, NodeOptional n2) { 038 f0 = new NodeToken("import"); 039 if ( f0 != null ) f0.setParent(this); 040 f1 = n0; 041 if ( f1 != null ) f1.setParent(this); 042 f2 = n1; 043 if ( f2 != null ) f2.setParent(this); 044 f3 = n2; 045 if ( f3 != null ) f3.setParent(this); 046 f4 = new NodeToken(";"); 047 if ( f4 != null ) f4.setParent(this); 048 } 049 050 public void accept(jtb.visitor.Visitor v) { 051 v.visit(this); 052 } 053 public <R,A> R accept(jtb.visitor.GJVisitor<R,A> v, A argu) { 054 return v.visit(this,argu); 055 } 056 public <R> R accept(jtb.visitor.GJNoArguVisitor<R> v) { 057 return v.visit(this); 058 } 059 public <A> void accept(jtb.visitor.GJVoidVisitor<A> v, A argu) { 060 v.visit(this,argu); 061 } 062 public void setParent(Node n) { parent = n; } 063 public Node getParent() { return parent; } 064} 065