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

/**
 * @production BodyDecl : {@link ASTNode};
 * @ast node
 * @declaredat JavaDemoNames.ast:5
 */
public abstract class BodyDecl extends ASTNode<ASTNode> implements Cloneable {
  /**
   * @apilevel internal
   */
  @SuppressWarnings({"unchecked", "cast"})
  public BodyDecl clone() throws CloneNotSupportedException {
    BodyDecl node = (BodyDecl) super.clone();
    node.isField_String_visited = null;
    node.isField_String_values = null;
    node.isMemberClass_String_visited = null;
    node.isMemberClass_String_values = null;
    node.in$Circle(false);
    node.is$Final(false);
    return node;
  }
  /**
   * 
   * @ast method
   * 
   */

  public BodyDecl() {
    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() {
  }
  /**
   * 
     * @apilevel low-level
     
   * @ast method
   * 
   */

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

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

  public void flushCache() {
    super.flushCache();
        isField_String_visited = null;
    isField_String_values = null;
    isMemberClass_String_visited = null;
    isMemberClass_String_values = null;
  }
  /**
   * 
      * @apilevel internal
      
   * @ast method
   * 
   */

  public void flushCollectionCache() {
    super.flushCollectionCache();
      }
  /**
   * @apilevel internal
   */
  protected java.util.Map isField_String_visited;
  protected java.util.Map isField_String_values;
  /**
   * @attribute syn
   * @aspect JavaDemoNames
   * @declaredat JavaDemoNames.jrag:64
   */

  public boolean isField(String name) {
    Object _parameters = name;
    if(isField_String_visited == null) isField_String_visited = new java.util.HashMap(4);
    if(isField_String_values == null) isField_String_values = new java.util.HashMap(4);
    

    
if(isField_String_values.containsKey(_parameters)) {
  return ((Boolean)isField_String_values.get(_parameters)).booleanValue(); 
}

    ASTNode$State state = state();
    if (Integer.valueOf(state().boundariesCrossed).equals(isField_String_visited.get(_parameters))) {
      throw new RuntimeException("Circular definition of attr: isField in class: ast.AST.SynDecl");
    }
                
    isField_String_visited.put(_parameters, Integer.valueOf(state().boundariesCrossed));
          
    int num = state.boundariesCrossed;
    boolean isFinal = this.is$Final();
    boolean isField_String_value = isField_compute(name);
      if(isFinal && num == state().boundariesCrossed){ isField_String_values.put(_parameters, Boolean.valueOf(isField_String_value)); }
    isField_String_visited.remove(_parameters);
        return isField_String_value;
  }
  /**
   * @apilevel internal
   */
  private boolean isField_compute(String name) {  return false;  }
  /**
   * @apilevel internal
   */
  protected java.util.Map isMemberClass_String_visited;
  protected java.util.Map isMemberClass_String_values;
  /**
   * @attribute syn
   * @aspect JavaDemoNames
   * @declaredat JavaDemoNames.jrag:113
   */

  public boolean isMemberClass(String name) {
    Object _parameters = name;
    if(isMemberClass_String_visited == null) isMemberClass_String_visited = new java.util.HashMap(4);
    if(isMemberClass_String_values == null) isMemberClass_String_values = new java.util.HashMap(4);
    

    
if(isMemberClass_String_values.containsKey(_parameters)) {
  return ((Boolean)isMemberClass_String_values.get(_parameters)).booleanValue(); 
}

    ASTNode$State state = state();
    if (Integer.valueOf(state().boundariesCrossed).equals(isMemberClass_String_visited.get(_parameters))) {
      throw new RuntimeException("Circular definition of attr: isMemberClass in class: ast.AST.SynDecl");
    }
                
    isMemberClass_String_visited.put(_parameters, Integer.valueOf(state().boundariesCrossed));
          
    int num = state.boundariesCrossed;
    boolean isFinal = this.is$Final();
    boolean isMemberClass_String_value = isMemberClass_compute(name);
      if(isFinal && num == state().boundariesCrossed){ isMemberClass_String_values.put(_parameters, Boolean.valueOf(isMemberClass_String_value)); }
    isMemberClass_String_visited.remove(_parameters);
        return isMemberClass_String_value;
  }
  /**
   * @apilevel internal
   */
  private boolean isMemberClass_compute(String name) {  return false;  }
  /**
   * @apilevel internal
   */
  public ASTNode rewriteTo() {    return super.rewriteTo();
  }}
