001//
002// Generated by JTB 1.3.2
003//
004
005package jtb.syntaxtree;
006
007// Grammar production:
008// f0 -> "@"
009// f1 -> Name()
010// f2 -> "("
011// f3 -> MemberValue()
012// f4 -> ")"
013public class SingleMemberAnnotation 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 Name f1;
020   public NodeToken f2;
021   public MemberValue f3;
022   public NodeToken f4;
023
024   public SingleMemberAnnotation(NodeToken n0, Name n1, NodeToken n2, MemberValue 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 SingleMemberAnnotation(Name n0, MemberValue n1) {
038      f0 = new NodeToken("@");
039      if ( f0 != null ) f0.setParent(this);
040      f1 = n0;
041      if ( f1 != null ) f1.setParent(this);
042      f2 = new NodeToken("(");
043      if ( f2 != null ) f2.setParent(this);
044      f3 = n1;
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