//
// Generated by JTB 1.2.1
//

package jde.parser.syntaxtree;

/**
 * Grammar production:
 * <PRE>
 * nodeToken -> "synchronized"
 * nodeToken1 -> "("
 * expression -> Expression()
 * nodeToken2 -> ")"
 * block -> Block()
 * </PRE>
 */
public class SynchronizedStatement implements Node {
   private Node parent;
   public NodeToken nodeToken;
   public NodeToken nodeToken1;
   public Expression expression;
   public NodeToken nodeToken2;
   public Block block;

   public SynchronizedStatement(NodeToken n0, NodeToken n1, Expression n2, NodeToken n3, Block n4) {
      nodeToken = n0;
      if ( nodeToken != null ) nodeToken.setParent(this);
      nodeToken1 = n1;
      if ( nodeToken1 != null ) nodeToken1.setParent(this);
      expression = n2;
      if ( expression != null ) expression.setParent(this);
      nodeToken2 = n3;
      if ( nodeToken2 != null ) nodeToken2.setParent(this);
      block = n4;
      if ( block != null ) block.setParent(this);
   }

   public SynchronizedStatement(Expression n0, Block n1) {
      nodeToken = new NodeToken("synchronized");
      if ( nodeToken != null ) nodeToken.setParent(this);
      nodeToken1 = new NodeToken("(");
      if ( nodeToken1 != null ) nodeToken1.setParent(this);
      expression = n0;
      if ( expression != null ) expression.setParent(this);
      nodeToken2 = new NodeToken(")");
      if ( nodeToken2 != null ) nodeToken2.setParent(this);
      block = n1;
      if ( block != null ) block.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; }
}

