/* This file was generated with JastAdd2 (http://jastadd.org) version jenkins-JastAdd2-430 */
package AST;

/**
 * @production Initializer : {@link BodyDecl} ::= <span class="component">{@link Block}</span>;
 * @ast node
 * @declaredat JavaDemoNames.ast:8
 */
public class Initializer extends BodyDecl implements Cloneable {
  /**
   * @apilevel internal
   */
  @SuppressWarnings({"unchecked", "cast"})
  public Initializer clone() throws CloneNotSupportedException {
    Initializer node = (Initializer) super.clone();
    node.in$Circle(false);
    node.is$Final(false);
    return node;
  }
  /**
   * @apilevel internal
   */
  @SuppressWarnings({"unchecked", "cast"})
  public Initializer copy() {
    try {
      Initializer node = (Initializer) clone();
      node.parent = null;
      if(children != null) {
        node.children = (ASTNode[]) children.clone();
      }
      return node;
    } catch (CloneNotSupportedException e) {
      throw new Error("Error: clone not supported for " + getClass().getName());
    }
  }
  /**
   * Create a deep copy of the AST subtree at this node.
   * The copy is dangling, i.e. has no parent.
   * @return dangling copy of the subtree at this node
   * @apilevel low-level
   */
  @SuppressWarnings({"unchecked", "cast"})
  public Initializer fullCopy() {
    Initializer tree = (Initializer) copy();
    if (children != null) {
      for (int i = 0; i < children.length; ++i) {
        ASTNode child = (ASTNode) children[i];
        if(child != null) {
          child = child.fullCopy();
          tree.setChild(child, i);
        }
      }
    }
    return tree;
  }
  /**
   * 
   * @ast method
   * 
   */

  public Initializer() {
    super();
  }
  /**
   * 
     * Initializes the child array to the correct size.
     * Initializes List and Opt nta children.
     * @apilevel internal
     * @ast method
     
   * @ast method
   * 
   */

  public void init$Children() {
    children = new ASTNode[1];
  }
  /**
   * 
   * @ast method
   * 
   */

  public Initializer(Block p0) {
    setChild(p0, 0);
  }
  /**
   * 
     * @apilevel low-level
     
   * @ast method
   * 
   */

  protected int numChildren() {
    return 1;
  }
  /**
   * 
     * @apilevel internal
     
   * @ast method
   * 
   */

  public boolean mayHaveRewrite() {
    return false;
  }
  /**
   * 
      * @apilevel low-level
      
   * @ast method
   * 
   */

  public void flushCache() {
    super.flushCache();
      }
  /**
   * 
      * @apilevel internal
      
   * @ast method
   * 
   */

  public void flushCollectionCache() {
    super.flushCollectionCache();
      }
  /**
   * 
     * Replaces the Block child.
     * @param node The new node to replace the Block child.
     * @apilevel high-level
     
   * @ast method
   * 
   */

  public void setBlock(Block node) {
    setChild(node, 0);
  }
  /**
   * 
     * Retrieves the Block child.
     * @return The current node used as the Block child.
     * @apilevel high-level
     
   * @ast method
   * 
   */

  public Block getBlock() {
    return (Block) getChild(0);
  }
  /**
   * 
     * Retrieves the Block child.
     * <p><em>This method does not invoke AST transformations.</em></p>
     * @return The current node used as the Block child.
     * @apilevel low-level
     
   * @ast method
   * 
   */

  public Block getBlockNoTransform() {
    return (Block) getChildNoTransform(0);
  }
  /**
   * @apilevel internal
   */
  public ASTNode rewriteTo() {    return super.rewriteTo();
  }}
