
package AST;

public abstract class BodyDecl extends ASTNode<ASTNode> implements Cloneable {

  @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;
    return node;
  }

  public BodyDecl() {
    super();
  }

  public void init$Children() {
  }

  protected int numChildren() {
    return 0;
  }

  public boolean mayHaveRewrite() {
    return false;
  }

  public void flushCache() {
    super.flushCache();
    isField_String_visited = null;
    isField_String_values = null;
    isMemberClass_String_visited = null;
    isMemberClass_String_values = null;
  }

  public void flushCollectionCache() {
    super.flushCollectionCache();
  }

  protected java.util.Map isField_String_visited;
  protected java.util.Map isField_String_values;

  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.CIRCLE_INDEX).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.CIRCLE_INDEX));     
    boolean cycleEndStore = state.CYCLE_END;
    boolean isField_String_value = isField_compute(name);
    if (!state.IN_CIRCLE || state.IN_CIRCLE && (!state.CYCLE_END || state.LAST_CYCLE)) {
      isField_String_values.put(_parameters, Boolean.valueOf(isField_String_value));
      Tracer.traceCached(this, "BodyDecl.isField", name, "" + isField_String_value);
    } else Tracer.traceCacheAbort(this, "BodyDecl.isField", name, "" + isField_String_value);
    state.CYCLE_END = cycleEndStore || state.CYCLE_END;
    isField_String_visited.remove(_parameters);
    return isField_String_value;
  }

  private boolean isField_compute(String name) {  return false;  }

  protected java.util.Map isMemberClass_String_visited;
  protected java.util.Map isMemberClass_String_values;

  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.CIRCLE_INDEX).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.CIRCLE_INDEX));     
    boolean cycleEndStore = state.CYCLE_END;
    boolean isMemberClass_String_value = isMemberClass_compute(name);
    if (!state.IN_CIRCLE || state.IN_CIRCLE && (!state.CYCLE_END || state.LAST_CYCLE) ) {
      isMemberClass_String_values.put(_parameters, Boolean.valueOf(isMemberClass_String_value));
      Tracer.traceCached(this, "BodyDecl.isMemberClass", name, "" + isMemberClass_String_value);
    } else Tracer.traceCacheAbort(this, "BodyDecl.isMemberClass", name, "" + isMemberClass_String_value);
    state.CYCLE_END = cycleEndStore || state.CYCLE_END;
    isMemberClass_String_visited.remove(_parameters);
    return isMemberClass_String_value;
  }

  private boolean isMemberClass_compute(String name) {  return false;  }

  public ASTNode rewriteTo() { return super.rewriteTo();
  }
}
