001    /* This file was generated with JastAdd2 (http://jastadd.org) version 2.1.3 */
002    package AST;
003    
004    import java.util.Collection;
005    import java.util.ArrayList;
006    import java.util.HashSet;
007    /**
008     * @ast node
009     * @declaredat /home/csz-naf/examples/PicoJava/spec/picojava.ast:4
010     * @production BlockStmt : {@link ASTNode};
011    
012     */
013    public abstract class BlockStmt extends ASTNode<ASTNode> implements Cloneable {
014      /**
015       * @apilevel internal
016       */
017      public BlockStmt clone() throws CloneNotSupportedException {
018        BlockStmt node = (BlockStmt) super.clone();
019        node.declarationOf_String_visited = null;
020        node.in$Circle(false);
021        node.is$Final(false);
022        return node;
023      }
024      /**
025       * @aspect PrettyPrint
026       * @declaredat /home/csz-naf/examples/PicoJava/spec/PrettyPrint.jadd:39
027       */
028      abstract void prettyPrint(StringBuilder sb, int t);
029      /**
030       */
031      public BlockStmt() {
032        super();
033      }
034      /**
035       * Initializes the child array to the correct size.
036       * Initializes List and Opt nta children.
037       * @apilevel internal
038       * @ast method
039       */
040      public void init$Children() {
041      }
042      /**
043       * @apilevel low-level
044       */
045      protected int numChildren() {
046        return 0;
047      }
048      /**
049       * @apilevel internal
050       */
051      public boolean mayHaveRewrite() {
052        return false;
053      }
054      /**
055       * @apilevel low-level
056       */
057      public void flushCache() {
058        super.flushCache();
059        declarationOf_String_visited = null;
060      }
061      /**
062       * @apilevel internal
063       */
064      public void flushCollectionCache() {
065        super.flushCollectionCache();
066      }
067      /**
068       * @apilevel internal
069       */
070      protected java.util.Map declarationOf_String_visited;
071      /**
072       * @attribute syn
073       * @aspect NameResolution
074       * @declaredat /home/csz-naf/examples/PicoJava/spec/NameResolution.jrag:100
075       */
076      public Decl declarationOf(String name) {
077        Object _parameters = name;
078        if(declarationOf_String_visited == null) declarationOf_String_visited = new java.util.HashMap(4);
079        ASTNode$State state = state();
080        if (Integer.valueOf(state().boundariesCrossed).equals(declarationOf_String_visited.get(_parameters))) {
081          throw new RuntimeException("Circular definition of attr: declarationOf in class: org.jastadd.ast.AST.SynDecl");
082        }
083        declarationOf_String_visited.put(_parameters, Integer.valueOf(state().boundariesCrossed));
084        try {  return null;  }
085        finally {
086          declarationOf_String_visited.remove(_parameters);
087        }
088      }
089      /**
090       * @apilevel internal
091       */
092      public ASTNode rewriteTo() {    return super.rewriteTo();
093      }}