//
// Generated by JTB 1.2.1
//

package jde.parser.syntaxtree;

/**
 * Grammar production:
 * <PRE>
 * nodeListOptional -> ( "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized" )*
 * resultType -> ResultType()
 * methodDeclarator -> MethodDeclarator()
 * nodeOptional -> [ "throws" NameList() ]
 * nodeChoice -> ( Block() | ";" )
 * </PRE>
 */
public class MethodDeclaration implements Node {
   private Node parent;
   public NodeListOptional nodeListOptional;
   public ResultType resultType;
   public MethodDeclarator methodDeclarator;
   public NodeOptional nodeOptional;
   public NodeChoice nodeChoice;

   public MethodDeclaration(NodeListOptional n0, ResultType n1, MethodDeclarator n2, NodeOptional n3, NodeChoice n4) {
      nodeListOptional = n0;
      if ( nodeListOptional != null ) nodeListOptional.setParent(this);
      resultType = n1;
      if ( resultType != null ) resultType.setParent(this);
      methodDeclarator = n2;
      if ( methodDeclarator != null ) methodDeclarator.setParent(this);
      nodeOptional = n3;
      if ( nodeOptional != null ) nodeOptional.setParent(this);
      nodeChoice = n4;
      if ( nodeChoice != null ) nodeChoice.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; }
}

