//
// Generated by JTB 1.2.1
//

package jde.parser.syntaxtree;

/**
 * Grammar production:
 * <PRE>
 * nodeListOptional -> ( "public" | "protected" | "private" | "static" | "final" | "transient" | "volatile" )*
 * type -> Type()
 * variableDeclarator -> VariableDeclarator()
 * nodeListOptional1 -> ( "," VariableDeclarator() )*
 * nodeToken -> ";"
 * </PRE>
 */
public class FieldDeclaration implements Node {
   private Node parent;
   public NodeListOptional nodeListOptional;
   public Type type;
   public VariableDeclarator variableDeclarator;
   public NodeListOptional nodeListOptional1;
   public NodeToken nodeToken;

   public FieldDeclaration(NodeListOptional n0, Type n1, VariableDeclarator n2, NodeListOptional n3, NodeToken n4) {
      nodeListOptional = n0;
      if ( nodeListOptional != null ) nodeListOptional.setParent(this);
      type = n1;
      if ( type != null ) type.setParent(this);
      variableDeclarator = n2;
      if ( variableDeclarator != null ) variableDeclarator.setParent(this);
      nodeListOptional1 = n3;
      if ( nodeListOptional1 != null ) nodeListOptional1.setParent(this);
      nodeToken = n4;
      if ( nodeToken != null ) nodeToken.setParent(this);
   }

   public FieldDeclaration(NodeListOptional n0, Type n1, VariableDeclarator n2, NodeListOptional n3) {
      nodeListOptional = n0;
      if ( nodeListOptional != null ) nodeListOptional.setParent(this);
      type = n1;
      if ( type != null ) type.setParent(this);
      variableDeclarator = n2;
      if ( variableDeclarator != null ) variableDeclarator.setParent(this);
      nodeListOptional1 = n3;
      if ( nodeListOptional1 != null ) nodeListOptional1.setParent(this);
      nodeToken = new NodeToken(";");
      if ( nodeToken != null ) nodeToken.setParent(this);
   }

   public void accept(jde.parser.visitor.Visitor v) {
      v.visit(this);
   }
   public Object accept(jde.parser.visitor.ObjectVisitor v, Object argu) {
      return v.visit(this,argu);
   }
   public void setParent(Node n) { parent = n; }
   public Node getParent()       { return parent; }
}

