001// 002// Generated by JTB 1.3.2 003// 004 005package jtb.syntaxtree; 006 007// Grammar production: 008// f0 -> ( "class" | "interface" ) 009// f1 -> <IDENTIFIER> 010// f2 -> [ TypeParameters() ] 011// f3 -> [ ExtendsList(isInterface) ] 012// f4 -> [ ImplementsList(isInterface) ] 013// f5 -> ClassOrInterfaceBody(isInterface) 014public class ClassOrInterfaceDeclaration 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 NodeChoice f0; 020 public NodeToken f1; 021 public NodeOptional f2; 022 public NodeOptional f3; 023 public NodeOptional f4; 024 public ClassOrInterfaceBody f5; 025 026 public ClassOrInterfaceDeclaration(NodeChoice n0, NodeToken n1, NodeOptional n2, NodeOptional n3, NodeOptional n4, ClassOrInterfaceBody 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 void accept(jtb.visitor.Visitor v) { 042 v.visit(this); 043 } 044 public <R,A> R accept(jtb.visitor.GJVisitor<R,A> v, A argu) { 045 return v.visit(this,argu); 046 } 047 public <R> R accept(jtb.visitor.GJNoArguVisitor<R> v) { 048 return v.visit(this); 049 } 050 public <A> void accept(jtb.visitor.GJVoidVisitor<A> v, A argu) { 051 v.visit(this,argu); 052 } 053 public void setParent(Node n) { parent = n; } 054 public Node getParent() { return parent; } 055} 056