001    /* This file was generated with JastAdd2 (http://jastadd.org) version R20130213 */
002    package AST;
003    
004    import java.util.HashSet;
005    import java.io.File;
006    import java.util.*;
007    import beaver.*;
008    import java.util.ArrayList;
009    import java.util.zip.*;
010    import java.io.*;
011    import java.io.FileNotFoundException;
012    import java.util.Collection;
013    /**
014     * @production InterfaceDeclSubstituted : {@link InterfaceDecl} ::= <span class="component">&lt;Original:TypeDecl&gt;</span> <span class="component">{@link BodyDecl}*</span>;
015     * @ast node
016     * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.ast:42
017     */
018    public class InterfaceDeclSubstituted extends InterfaceDecl implements Cloneable, MemberSubstitutor {
019      /**
020       * @apilevel low-level
021       */
022      public void flushCache() {
023      }
024      /**
025       * @apilevel internal
026       */
027      public void flushCollectionCache() {
028      }
029      /**
030       * @apilevel internal
031       */
032      @SuppressWarnings({"unchecked", "cast"})
033      public InterfaceDeclSubstituted clone() throws CloneNotSupportedException {
034        InterfaceDeclSubstituted node = (InterfaceDeclSubstituted)super.clone();
035        node.getBodyDeclList_computed = false;
036        node.getBodyDeclList_value = null;
037        node.sourceTypeDecl_computed = false;
038        node.sourceTypeDecl_value = null;
039        node.instanceOf_TypeDecl_values = null;
040        node.subtype_TypeDecl_values = null;
041        node.typeDescriptor_computed = false;
042        node.typeDescriptor_value = null;
043        node.constantPoolName_computed = false;
044        node.constantPoolName_value = null;
045        node.uniqueIndex_computed = false;
046        node.localMethodsSignatureMap_computed = false;
047        node.localMethodsSignatureMap_value = null;
048        node.localFields_String_values = null;
049        node.localTypeDecls_String_values = null;
050        node.constructors_computed = false;
051        node.constructors_value = null;
052        node.in$Circle(false);
053        node.is$Final(false);
054        return node;
055      }
056    /**
057     * @apilevel internal
058     */
059      @SuppressWarnings({"unchecked", "cast"})
060    public InterfaceDeclSubstituted copy() {
061      
062      try {
063        InterfaceDeclSubstituted node = (InterfaceDeclSubstituted) clone();
064        node.parent = null;
065        if(children != null)
066          node.children = (ASTNode[]) children.clone();
067        
068        return node;
069      } catch (CloneNotSupportedException e) {
070        throw new Error("Error: clone not supported for " + getClass().getName());
071      }
072      
073    }/**
074     * Create a deep copy of the AST subtree at this node.
075     * The copy is dangling, i.e. has no parent.
076     * @return dangling copy of the subtree at this node
077     * @apilevel low-level
078     */
079      @SuppressWarnings({"unchecked", "cast"})
080    public InterfaceDeclSubstituted fullCopy() {
081      
082      InterfaceDeclSubstituted tree = (InterfaceDeclSubstituted) copy();
083      if (children != null) {
084        for (int i = 0; i < children.length; ++i) {
085                    switch (i) {
086                    case 4:
087                      tree.children[i] = new List();
088                      continue;
089                    }
090          ASTNode child = (ASTNode) children[i];
091          if(child != null) {
092            child = child.fullCopy();
093            tree.setChild(child, i);
094          }
095        }
096      }
097      return tree;
098      
099    }  /**
100       * @ast method 
101       * 
102       */
103      public InterfaceDeclSubstituted() {
104        super();
105    
106    
107      }
108      /**
109       * Initializes the child array to the correct size.
110       * Initializes List and Opt nta children.
111       * @apilevel internal
112       * @ast method
113       * @ast method 
114       * 
115       */
116      public void init$Children() {
117        children = new ASTNode[3];
118        setChild(new List(), 1);
119        setChild(new List(), 2);
120      }
121      /**
122       * @ast method 
123       * 
124       */
125      public InterfaceDeclSubstituted(Modifiers p0, String p1, List<Access> p2, TypeDecl p3) {
126        setChild(p0, 0);
127        setID(p1);
128        setChild(p2, 1);
129        setOriginal(p3);
130      }
131      /**
132       * @ast method 
133       * 
134       */
135      public InterfaceDeclSubstituted(Modifiers p0, beaver.Symbol p1, List<Access> p2, TypeDecl p3) {
136        setChild(p0, 0);
137        setID(p1);
138        setChild(p2, 1);
139        setOriginal(p3);
140      }
141      /**
142       * @apilevel low-level
143       * @ast method 
144       * 
145       */
146      protected int numChildren() {
147        return 2;
148      }
149      /**
150       * @apilevel internal
151       * @ast method 
152       * 
153       */
154      public boolean mayHaveRewrite() {
155        return false;
156      }
157      /**
158       * Replaces the Modifiers child.
159       * @param node The new node to replace the Modifiers child.
160       * @apilevel high-level
161       * @ast method 
162       * 
163       */
164      public void setModifiers(Modifiers node) {
165        setChild(node, 0);
166      }
167      /**
168       * Retrieves the Modifiers child.
169       * @return The current node used as the Modifiers child.
170       * @apilevel high-level
171       * @ast method 
172       * 
173       */
174      public Modifiers getModifiers() {
175        return (Modifiers)getChild(0);
176      }
177      /**
178       * Retrieves the Modifiers child.
179       * <p><em>This method does not invoke AST transformations.</em></p>
180       * @return The current node used as the Modifiers child.
181       * @apilevel low-level
182       * @ast method 
183       * 
184       */
185      public Modifiers getModifiersNoTransform() {
186        return (Modifiers)getChildNoTransform(0);
187      }
188      /**
189       * Replaces the lexeme ID.
190       * @param value The new value for the lexeme ID.
191       * @apilevel high-level
192       * @ast method 
193       * 
194       */
195      public void setID(String value) {
196        tokenString_ID = value;
197      }
198      /**
199       * JastAdd-internal setter for lexeme ID using the Beaver parser.
200       * @apilevel internal
201       * @ast method 
202       * 
203       */
204      public void setID(beaver.Symbol symbol) {
205        if(symbol.value != null && !(symbol.value instanceof String))
206          throw new UnsupportedOperationException("setID is only valid for String lexemes");
207        tokenString_ID = (String)symbol.value;
208        IDstart = symbol.getStart();
209        IDend = symbol.getEnd();
210      }
211      /**
212       * Retrieves the value for the lexeme ID.
213       * @return The value for the lexeme ID.
214       * @apilevel high-level
215       * @ast method 
216       * 
217       */
218      public String getID() {
219        return tokenString_ID != null ? tokenString_ID : "";
220      }
221      /**
222       * Replaces the SuperInterfaceId list.
223       * @param list The new list node to be used as the SuperInterfaceId list.
224       * @apilevel high-level
225       * @ast method 
226       * 
227       */
228      public void setSuperInterfaceIdList(List<Access> list) {
229        setChild(list, 1);
230      }
231      /**
232       * Retrieves the number of children in the SuperInterfaceId list.
233       * @return Number of children in the SuperInterfaceId list.
234       * @apilevel high-level
235       * @ast method 
236       * 
237       */
238      public int getNumSuperInterfaceId() {
239        return getSuperInterfaceIdList().getNumChild();
240      }
241      /**
242       * Retrieves the number of children in the SuperInterfaceId list.
243       * Calling this method will not trigger rewrites..
244       * @return Number of children in the SuperInterfaceId list.
245       * @apilevel low-level
246       * @ast method 
247       * 
248       */
249      public int getNumSuperInterfaceIdNoTransform() {
250        return getSuperInterfaceIdListNoTransform().getNumChildNoTransform();
251      }
252      /**
253       * Retrieves the element at index {@code i} in the SuperInterfaceId list..
254       * @param i Index of the element to return.
255       * @return The element at position {@code i} in the SuperInterfaceId list.
256       * @apilevel high-level
257       * @ast method 
258       * 
259       */
260      @SuppressWarnings({"unchecked", "cast"})
261      public Access getSuperInterfaceId(int i) {
262        return (Access)getSuperInterfaceIdList().getChild(i);
263      }
264      /**
265       * Append an element to the SuperInterfaceId list.
266       * @param node The element to append to the SuperInterfaceId list.
267       * @apilevel high-level
268       * @ast method 
269       * 
270       */
271      public void addSuperInterfaceId(Access node) {
272        List<Access> list = (parent == null || state == null) ? getSuperInterfaceIdListNoTransform() : getSuperInterfaceIdList();
273        list.addChild(node);
274      }
275      /**
276       * @apilevel low-level
277       * @ast method 
278       * 
279       */
280      public void addSuperInterfaceIdNoTransform(Access node) {
281        List<Access> list = getSuperInterfaceIdListNoTransform();
282        list.addChild(node);
283      }
284      /**
285       * Replaces the SuperInterfaceId list element at index {@code i} with the new node {@code node}.
286       * @param node The new node to replace the old list element.
287       * @param i The list index of the node to be replaced.
288       * @apilevel high-level
289       * @ast method 
290       * 
291       */
292      public void setSuperInterfaceId(Access node, int i) {
293        List<Access> list = getSuperInterfaceIdList();
294        list.setChild(node, i);
295      }
296      /**
297       * Retrieves the SuperInterfaceId list.
298       * @return The node representing the SuperInterfaceId list.
299       * @apilevel high-level
300       * @ast method 
301       * 
302       */
303      public List<Access> getSuperInterfaceIds() {
304        return getSuperInterfaceIdList();
305      }
306      /**
307       * Retrieves the SuperInterfaceId list.
308       * <p><em>This method does not invoke AST transformations.</em></p>
309       * @return The node representing the SuperInterfaceId list.
310       * @apilevel low-level
311       * @ast method 
312       * 
313       */
314      public List<Access> getSuperInterfaceIdsNoTransform() {
315        return getSuperInterfaceIdListNoTransform();
316      }
317      /**
318       * Retrieves the SuperInterfaceId list.
319       * @return The node representing the SuperInterfaceId list.
320       * @apilevel high-level
321       * @ast method 
322       * 
323       */
324      @SuppressWarnings({"unchecked", "cast"})
325      public List<Access> getSuperInterfaceIdList() {
326        List<Access> list = (List<Access>)getChild(1);
327        list.getNumChild();
328        return list;
329      }
330      /**
331       * Retrieves the SuperInterfaceId list.
332       * <p><em>This method does not invoke AST transformations.</em></p>
333       * @return The node representing the SuperInterfaceId list.
334       * @apilevel low-level
335       * @ast method 
336       * 
337       */
338      @SuppressWarnings({"unchecked", "cast"})
339      public List<Access> getSuperInterfaceIdListNoTransform() {
340        return (List<Access>)getChildNoTransform(1);
341      }
342      /**
343       * Replaces the lexeme Original.
344       * @param value The new value for the lexeme Original.
345       * @apilevel high-level
346       * @ast method 
347       * 
348       */
349      public void setOriginal(TypeDecl value) {
350        tokenTypeDecl_Original = value;
351      }
352      /**
353       * @apilevel internal
354       * @ast method 
355       * 
356       */
357      
358      /**
359       * @apilevel internal
360       */
361      protected TypeDecl tokenTypeDecl_Original;
362      /**
363       * Retrieves the value for the lexeme Original.
364       * @return The value for the lexeme Original.
365       * @apilevel high-level
366       * @ast method 
367       * 
368       */
369      public TypeDecl getOriginal() {
370        return tokenTypeDecl_Original;
371      }
372      /**
373       * Replaces the BodyDecl list.
374       * @param list The new list node to be used as the BodyDecl list.
375       * @apilevel high-level
376       * @ast method 
377       * 
378       */
379      public void setBodyDeclList(List<BodyDecl> list) {
380        setChild(list, 2);
381      }
382      /**
383       * Retrieves the number of children in the BodyDecl list.
384       * @return Number of children in the BodyDecl list.
385       * @apilevel high-level
386       * @ast method 
387       * 
388       */
389      public int getNumBodyDecl() {
390        return getBodyDeclList().getNumChild();
391      }
392      /**
393       * Retrieves the number of children in the BodyDecl list.
394       * Calling this method will not trigger rewrites..
395       * @return Number of children in the BodyDecl list.
396       * @apilevel low-level
397       * @ast method 
398       * 
399       */
400      public int getNumBodyDeclNoTransform() {
401        return getBodyDeclListNoTransform().getNumChildNoTransform();
402      }
403      /**
404       * Retrieves the element at index {@code i} in the BodyDecl list..
405       * @param i Index of the element to return.
406       * @return The element at position {@code i} in the BodyDecl list.
407       * @apilevel high-level
408       * @ast method 
409       * 
410       */
411      @SuppressWarnings({"unchecked", "cast"})
412      public BodyDecl getBodyDecl(int i) {
413        return (BodyDecl)getBodyDeclList().getChild(i);
414      }
415      /**
416       * Append an element to the BodyDecl list.
417       * @param node The element to append to the BodyDecl list.
418       * @apilevel high-level
419       * @ast method 
420       * 
421       */
422      public void addBodyDecl(BodyDecl node) {
423        List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList();
424        list.addChild(node);
425      }
426      /**
427       * @apilevel low-level
428       * @ast method 
429       * 
430       */
431      public void addBodyDeclNoTransform(BodyDecl node) {
432        List<BodyDecl> list = getBodyDeclListNoTransform();
433        list.addChild(node);
434      }
435      /**
436       * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}.
437       * @param node The new node to replace the old list element.
438       * @param i The list index of the node to be replaced.
439       * @apilevel high-level
440       * @ast method 
441       * 
442       */
443      public void setBodyDecl(BodyDecl node, int i) {
444        List<BodyDecl> list = getBodyDeclList();
445        list.setChild(node, i);
446      }
447      /**
448       * Retrieves the BodyDecl list.
449       * @return The node representing the BodyDecl list.
450       * @apilevel high-level
451       * @ast method 
452       * 
453       */
454      public List<BodyDecl> getBodyDecls() {
455        return getBodyDeclList();
456      }
457      /**
458       * Retrieves the BodyDecl list.
459       * <p><em>This method does not invoke AST transformations.</em></p>
460       * @return The node representing the BodyDecl list.
461       * @apilevel low-level
462       * @ast method 
463       * 
464       */
465      public List<BodyDecl> getBodyDeclsNoTransform() {
466        return getBodyDeclListNoTransform();
467      }
468      /**
469       * Retrieves the BodyDecl list.
470       * <p><em>This method does not invoke AST transformations.</em></p>
471       * @return The node representing the BodyDecl list.
472       * @apilevel low-level
473       * @ast method 
474       * 
475       */
476      public List<BodyDecl> getBodyDeclListNoTransform() {
477        return (List<BodyDecl>)getChildNoTransform(2);
478      }
479      /**
480       * Retrieves the child position of the BodyDecl list.
481       * @return The the child position of the BodyDecl list.
482       * @apilevel low-level
483       * @ast method 
484       * 
485       */
486      protected int getBodyDeclListChildPosition() {
487        return 2;
488      }
489      /**
490       * @attribute syn
491       * @aspect NestedTypes
492       * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:569
493       */
494      public TypeDecl hostType() {
495        ASTNode$State state = state();
496        try {  return getOriginal();  }
497        finally {
498        }
499      }
500      /**
501       * @apilevel internal
502       */
503      protected boolean getBodyDeclList_computed = false;
504      /**
505       * @apilevel internal
506       */
507      protected List getBodyDeclList_value;
508      /**
509       * @attribute syn nta
510       * @aspect LookupParTypeDecl
511       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:1051
512       */
513      @SuppressWarnings({"unchecked", "cast"})
514      public List getBodyDeclList() {
515        if(getBodyDeclList_computed) {
516          return (List) getChild(getBodyDeclListChildPosition());
517        }
518          ASTNode$State state = state();
519      int num = state.boundariesCrossed;
520      boolean isFinal = this.is$Final();
521        getBodyDeclList_value = getBodyDeclList_compute();
522        setBodyDeclList(getBodyDeclList_value);
523      if(isFinal && num == state().boundariesCrossed){ getBodyDeclList_computed = true; }
524        List node = (List) this.getChild(getBodyDeclListChildPosition());
525        return node;
526      }
527      /**
528       * @apilevel internal
529       */
530      private List getBodyDeclList_compute() {  return new BodyDeclList();  }
531      /**
532       * @attribute syn
533       * @aspect LookupParTypeDecl
534       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:1306
535       */
536      public TypeDecl original() {
537        ASTNode$State state = state();
538        try {  return getOriginal().original();  }
539        finally {
540        }
541      }
542      /**
543       * @apilevel internal
544       */
545      protected boolean sourceTypeDecl_computed = false;
546      /**
547       * @apilevel internal
548       */
549      protected TypeDecl sourceTypeDecl_value;
550      /**
551       * @attribute syn
552       * @aspect SourceDeclarations
553       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:1507
554       */
555      @SuppressWarnings({"unchecked", "cast"})
556      public TypeDecl sourceTypeDecl() {
557        if(sourceTypeDecl_computed) {
558          return sourceTypeDecl_value;
559        }
560          ASTNode$State state = state();
561      int num = state.boundariesCrossed;
562      boolean isFinal = this.is$Final();
563        sourceTypeDecl_value = sourceTypeDecl_compute();
564      if(isFinal && num == state().boundariesCrossed){ sourceTypeDecl_computed = true; }
565            return sourceTypeDecl_value;
566      }
567      /**
568       * @apilevel internal
569       */
570      private TypeDecl sourceTypeDecl_compute() {  return original().sourceTypeDecl();  }
571      protected java.util.Map instanceOf_TypeDecl_values;
572      /**
573       * @attribute syn
574       * @aspect GenericsSubtype
575       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:487
576       */
577      @SuppressWarnings({"unchecked", "cast"})
578      public boolean instanceOf(TypeDecl type) {
579        Object _parameters = type;
580        if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4);
581        if(instanceOf_TypeDecl_values.containsKey(_parameters)) {
582          return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue();
583        }
584          ASTNode$State state = state();
585      int num = state.boundariesCrossed;
586      boolean isFinal = this.is$Final();
587        boolean instanceOf_TypeDecl_value = instanceOf_compute(type);
588      if(isFinal && num == state().boundariesCrossed){ instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); }
589            return instanceOf_TypeDecl_value;
590      }
591      /**
592       * @apilevel internal
593       */
594      private boolean instanceOf_compute(TypeDecl type) {  return subtype(type);  }
595      protected java.util.Map subtype_TypeDecl_values;
596      /**
597       * @attribute syn
598       * @aspect GenericsSubtype
599       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:501
600       */
601      @SuppressWarnings({"unchecked", "cast"})
602      public boolean subtype(TypeDecl type) {
603        Object _parameters = type;
604        if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4);
605        ASTNode$State.CircularValue _value;
606        if(subtype_TypeDecl_values.containsKey(_parameters)) {
607          Object _o = subtype_TypeDecl_values.get(_parameters);
608          if(!(_o instanceof ASTNode$State.CircularValue)) {
609            return ((Boolean)_o).booleanValue();
610          }
611          else
612            _value = (ASTNode$State.CircularValue)_o;
613        }
614        else {
615          _value = new ASTNode$State.CircularValue();
616          subtype_TypeDecl_values.put(_parameters, _value);
617          _value.value = Boolean.valueOf(true);
618        }
619        ASTNode$State state = state();
620        if (!state.IN_CIRCLE) {
621          state.IN_CIRCLE = true;
622          int num = state.boundariesCrossed;
623          boolean isFinal = this.is$Final();
624          boolean new_subtype_TypeDecl_value;
625          do {
626            _value.visited = new Integer(state.CIRCLE_INDEX);
627            state.CHANGE = false;
628            new_subtype_TypeDecl_value = subtype_compute(type);
629            if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) {
630              state.CHANGE = true;
631              _value.value = Boolean.valueOf(new_subtype_TypeDecl_value);
632            }
633            state.CIRCLE_INDEX++;
634          } while (state.CHANGE);
635            if(isFinal && num == state().boundariesCrossed) {
636            subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value);
637          }
638          else {
639            subtype_TypeDecl_values.remove(_parameters);
640          state.RESET_CYCLE = true;
641          subtype_compute(type);
642          state.RESET_CYCLE = false;
643          }
644          state.IN_CIRCLE = false; 
645          return new_subtype_TypeDecl_value;
646        }
647        if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) {
648          _value.visited = new Integer(state.CIRCLE_INDEX);
649          boolean new_subtype_TypeDecl_value = subtype_compute(type);
650          if (state.RESET_CYCLE) {
651            subtype_TypeDecl_values.remove(_parameters);
652          }
653          else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) {
654            state.CHANGE = true;
655            _value.value = new_subtype_TypeDecl_value;
656          }
657          return new_subtype_TypeDecl_value;
658        }
659        return ((Boolean)_value.value).booleanValue();
660      }
661      /**
662       * @apilevel internal
663       */
664      private boolean subtype_compute(TypeDecl type) {  return type.supertypeInterfaceDeclSubstituted(this);  }
665      /**
666       * @attribute syn
667       * @aspect GenericsSubtype
668       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:503
669       */
670      public boolean supertypeInterfaceDeclSubstituted(InterfaceDeclSubstituted type) {
671        ASTNode$State state = state();
672        try {  return original() == type.original() && type.enclosingType().subtype(enclosingType()) || super.supertypeInterfaceDeclSubstituted(type);  }
673        finally {
674        }
675      }
676      /**
677       * @attribute syn
678       * @aspect GenericsSubtype
679       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:437
680       */
681      public boolean supertypeInterfaceDecl(InterfaceDecl type) {
682        ASTNode$State state = state();
683        try {  return super.supertypeInterfaceDecl(type) || original().supertypeInterfaceDecl(type);  }
684        finally {
685        }
686      }
687      /**
688       * @apilevel internal
689       */
690      protected boolean typeDescriptor_computed = false;
691      /**
692       * @apilevel internal
693       */
694      protected String typeDescriptor_value;
695      /**
696       * @attribute syn
697       * @aspect GenericsCodegen
698       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Backend/GenericsCodegen.jrag:22
699       */
700      @SuppressWarnings({"unchecked", "cast"})
701      public String typeDescriptor() {
702        if(typeDescriptor_computed) {
703          return typeDescriptor_value;
704        }
705          ASTNode$State state = state();
706      int num = state.boundariesCrossed;
707      boolean isFinal = this.is$Final();
708        typeDescriptor_value = typeDescriptor_compute();
709      if(isFinal && num == state().boundariesCrossed){ typeDescriptor_computed = true; }
710            return typeDescriptor_value;
711      }
712      /**
713       * @apilevel internal
714       */
715      private String typeDescriptor_compute() {  return original().typeDescriptor();  }
716      /**
717       * @apilevel internal
718       */
719      protected boolean constantPoolName_computed = false;
720      /**
721       * @apilevel internal
722       */
723      protected String constantPoolName_value;
724      /**
725       * @attribute syn
726       * @aspect GenericsCodegen
727       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Backend/GenericsCodegen.jrag:27
728       */
729      @SuppressWarnings({"unchecked", "cast"})
730      public String constantPoolName() {
731        if(constantPoolName_computed) {
732          return constantPoolName_value;
733        }
734          ASTNode$State state = state();
735      int num = state.boundariesCrossed;
736      boolean isFinal = this.is$Final();
737        constantPoolName_value = constantPoolName_compute();
738      if(isFinal && num == state().boundariesCrossed){ constantPoolName_computed = true; }
739            return constantPoolName_value;
740      }
741      /**
742       * @apilevel internal
743       */
744      private String constantPoolName_compute() {  return original().constantPoolName();  }
745      /**
746       * @apilevel internal
747       */
748      protected boolean uniqueIndex_computed = false;
749      /**
750       * @apilevel internal
751       */
752      protected int uniqueIndex_value;
753      /**
754       * @attribute syn
755       * @aspect GenericsCodegen
756       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Backend/GenericsCodegen.jrag:31
757       */
758      @SuppressWarnings({"unchecked", "cast"})
759      public int uniqueIndex() {
760        if(uniqueIndex_computed) {
761          return uniqueIndex_value;
762        }
763          ASTNode$State state = state();
764      int num = state.boundariesCrossed;
765      boolean isFinal = this.is$Final();
766        uniqueIndex_value = uniqueIndex_compute();
767      if(isFinal && num == state().boundariesCrossed){ uniqueIndex_computed = true; }
768            return uniqueIndex_value;
769      }
770      /**
771       * @apilevel internal
772       */
773      private int uniqueIndex_compute() {  return original().uniqueIndex();  }
774      /**
775       * @attribute syn
776       * @aspect CreateBCode
777       * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:820
778       */
779      public String arrayTypeDescriptor() {
780        ASTNode$State state = state();
781        try {  return original().arrayTypeDescriptor();  }
782        finally {
783        }
784      }
785      /**
786       * @apilevel internal
787       */
788      protected boolean localMethodsSignatureMap_computed = false;
789      /**
790       * @apilevel internal
791       */
792      protected HashMap localMethodsSignatureMap_value;
793      /**
794       * @attribute syn
795       * @aspect LookupParTypeDecl
796       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:1084
797       */
798      @SuppressWarnings({"unchecked", "cast"})
799      public HashMap localMethodsSignatureMap() {
800        if(localMethodsSignatureMap_computed) {
801          return localMethodsSignatureMap_value;
802        }
803          ASTNode$State state = state();
804      int num = state.boundariesCrossed;
805      boolean isFinal = this.is$Final();
806        localMethodsSignatureMap_value = localMethodsSignatureMap_compute();
807      if(true){ localMethodsSignatureMap_computed = true; }
808            return localMethodsSignatureMap_value;
809      }
810      /**
811       * @apilevel internal
812       */
813      private HashMap localMethodsSignatureMap_compute() {
814        HashMap map = new HashMap();
815        for(Iterator iter = original().localMethodsIterator(); iter.hasNext(); ) {
816          MethodDecl decl = (MethodDecl)iter.next();
817    
818          /* ES removing this:
819          if(!decl.isStatic() && (decl.usesTypeVariable() || isRawType())) {
820            BodyDecl b = decl.substitutedBodyDecl(this);
821            addBodyDecl(b);
822               // Here we should access b through an ordinary
823               // child accessor instead of setting is$Final directly,
824               // however doing so appears to cause unexpected behaviour!
825            b.is$Final = true;
826            decl = (MethodDecl) b;
827          }
828          map.put(decl.signature(), decl);
829          * and replacing with:
830          */
831          if(!decl.isStatic() && (decl.usesTypeVariable() || isRawType())) {
832            BodyDecl copyDecl = ((BodyDeclList)getBodyDeclList()).localMethodSignatureCopy(decl, this);
833            decl = (MethodDecl) copyDecl;
834          }
835          map.put(decl.signature(), decl);
836    
837        }
838        return map;
839      }
840      protected java.util.Map localFields_String_values;
841      /**
842       * @attribute syn
843       * @aspect LookupParTypeDecl
844       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:1119
845       */
846      @SuppressWarnings({"unchecked", "cast"})
847      public SimpleSet localFields(String name) {
848        Object _parameters = name;
849        if(localFields_String_values == null) localFields_String_values = new java.util.HashMap(4);
850        if(localFields_String_values.containsKey(_parameters)) {
851          return (SimpleSet)localFields_String_values.get(_parameters);
852        }
853          ASTNode$State state = state();
854      int num = state.boundariesCrossed;
855      boolean isFinal = this.is$Final();
856        SimpleSet localFields_String_value = localFields_compute(name);
857      if(true){ localFields_String_values.put(_parameters, localFields_String_value); }
858            return localFields_String_value;
859      }
860      /**
861       * @apilevel internal
862       */
863      private SimpleSet localFields_compute(String name) {
864        SimpleSet set = SimpleSet.emptySet;
865        for(Iterator iter = original().localFields(name).iterator(); iter.hasNext(); ) {
866          FieldDeclaration f = (FieldDeclaration)iter.next();
867    
868          /* ES removing this:   
869          if(!f.isStatic() && (f.usesTypeVariable() || isRawType())) {
870            BodyDecl b = f.substitutedBodyDecl(this);
871            addBodyDecl(b);
872               // Here we should access b through an ordinary
873               // child accessor instead of setting is$Final directly,
874               // however doing so appears to cause unexpected behaviour!
875            b.is$Final = true;
876            f = (FieldDeclaration) b;
877          }
878          set = set.add(f);
879          * and replacing with:
880          */
881          if(!f.isStatic() && (f.usesTypeVariable() || isRawType())) {
882            BodyDecl fCopy = ((BodyDeclList)getBodyDeclList()).localFieldCopy(f, this);
883            f = (FieldDeclaration) fCopy;
884          }
885          set = set.add(f);
886    
887        }
888        return set;
889      }
890      protected java.util.Map localTypeDecls_String_values;
891      /**
892       * @attribute syn
893       * @aspect LookupParTypeDecl
894       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:1154
895       */
896      @SuppressWarnings({"unchecked", "cast"})
897      public SimpleSet localTypeDecls(String name) {
898        Object _parameters = name;
899        if(localTypeDecls_String_values == null) localTypeDecls_String_values = new java.util.HashMap(4);
900        ASTNode$State.CircularValue _value;
901        if(localTypeDecls_String_values.containsKey(_parameters)) {
902          Object _o = localTypeDecls_String_values.get(_parameters);
903          if(!(_o instanceof ASTNode$State.CircularValue)) {
904            return (SimpleSet)_o;
905          }
906          else
907            _value = (ASTNode$State.CircularValue)_o;
908        }
909        else {
910          _value = new ASTNode$State.CircularValue();
911          localTypeDecls_String_values.put(_parameters, _value);
912          _value.value = SimpleSet.emptySet;
913        }
914        ASTNode$State state = state();
915        if (!state.IN_CIRCLE) {
916          state.IN_CIRCLE = true;
917          int num = state.boundariesCrossed;
918          boolean isFinal = this.is$Final();
919          SimpleSet new_localTypeDecls_String_value;
920          do {
921            _value.visited = new Integer(state.CIRCLE_INDEX);
922            state.CHANGE = false;
923            new_localTypeDecls_String_value = localTypeDecls_compute(name);
924            if ((new_localTypeDecls_String_value==null && (SimpleSet)_value.value!=null) || (new_localTypeDecls_String_value!=null && !new_localTypeDecls_String_value.equals((SimpleSet)_value.value))) {
925              state.CHANGE = true;
926              _value.value = new_localTypeDecls_String_value;
927            }
928            state.CIRCLE_INDEX++;
929          } while (state.CHANGE);
930            if(true) {
931            localTypeDecls_String_values.put(_parameters, new_localTypeDecls_String_value);
932          }
933          else {
934            localTypeDecls_String_values.remove(_parameters);
935          state.RESET_CYCLE = true;
936          localTypeDecls_compute(name);
937          state.RESET_CYCLE = false;
938          }
939          state.IN_CIRCLE = false; 
940          return new_localTypeDecls_String_value;
941        }
942        if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) {
943          _value.visited = new Integer(state.CIRCLE_INDEX);
944          SimpleSet new_localTypeDecls_String_value = localTypeDecls_compute(name);
945          if (state.RESET_CYCLE) {
946            localTypeDecls_String_values.remove(_parameters);
947          }
948          else if ((new_localTypeDecls_String_value==null && (SimpleSet)_value.value!=null) || (new_localTypeDecls_String_value!=null && !new_localTypeDecls_String_value.equals((SimpleSet)_value.value))) {
949            state.CHANGE = true;
950            _value.value = new_localTypeDecls_String_value;
951          }
952          return new_localTypeDecls_String_value;
953        }
954        return (SimpleSet)_value.value;
955      }
956      /**
957       * @apilevel internal
958       */
959      private SimpleSet localTypeDecls_compute(String name) {
960        SimpleSet set = SimpleSet.emptySet;
961        for(Iterator iter = original().localTypeDecls(name).iterator(); iter.hasNext(); ) {
962          TypeDecl t = (TypeDecl)iter.next();
963    
964          /* ES: removing this:
965          if(t.isStatic())
966            set = set.add(t);
967          else {
968            BodyDecl b;
969            TypeDecl typeDecl;
970            if(t instanceof ClassDecl) {
971              ClassDecl classDecl = (ClassDecl)t;
972              typeDecl = classDecl.substitutedClassDecl(this);
973              b = new MemberClassDecl((ClassDecl)typeDecl);
974              addBodyDecl(b);
975                 // Here we should access b through an ordinary
976                 // child accessor instead of setting is$Final directly,
977                 // however doing so appears to cause unexpected behaviour!
978                 b.is$Final = true;
979              set = set.add(typeDecl);
980            }
981            else if(t instanceof InterfaceDecl) {
982              InterfaceDecl interfaceDecl = (InterfaceDecl)t;
983              typeDecl = interfaceDecl.substitutedInterfaceDecl(this);
984              b = new MemberInterfaceDecl((InterfaceDecl)typeDecl);
985              addBodyDecl(b);
986                 // Here we should access b through an ordinary
987                 // child accessor instead of setting is$Final directly,
988                 // however doing so appears to cause unexpected behaviour!
989                 b.is$Final = true;
990              set = set.add(typeDecl);
991            }
992          }
993          * and replacing with:
994          */
995          if(t.isStatic()) {
996            set = set.add(t);
997          } else if (t instanceof ClassDecl) {
998            MemberClassDecl copy = ((BodyDeclList)getBodyDeclList()).localClassDeclCopy((ClassDecl)t, this);
999            set = set.add(copy.getClassDecl());
1000          } else if (t instanceof InterfaceDecl) {
1001            MemberInterfaceDecl copy = ((BodyDeclList)getBodyDeclList()).localInterfaceDeclCopy((InterfaceDecl)t, this);
1002            set = set.add(copy.getInterfaceDecl());
1003          }
1004        }
1005        return set;
1006      }
1007      /**
1008       * @apilevel internal
1009       */
1010      protected boolean constructors_computed = false;
1011      /**
1012       * @apilevel internal
1013       */
1014      protected Collection constructors_value;
1015      /**
1016       * @attribute syn
1017       * @aspect LookupParTypeDecl
1018       * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/Generics.jrag:1213
1019       */
1020      @SuppressWarnings({"unchecked", "cast"})
1021      public Collection constructors() {
1022        if(constructors_computed) {
1023          return constructors_value;
1024        }
1025          ASTNode$State state = state();
1026      int num = state.boundariesCrossed;
1027      boolean isFinal = this.is$Final();
1028        constructors_value = constructors_compute();
1029      if(isFinal && num == state().boundariesCrossed){ constructors_computed = true; }
1030            return constructors_value;
1031      }
1032      /**
1033       * @apilevel internal
1034       */
1035      private Collection constructors_compute() {
1036        Collection set = new ArrayList();
1037        for(Iterator iter = original().constructors().iterator(); iter.hasNext(); ) {
1038          ConstructorDecl c = (ConstructorDecl)iter.next();
1039    
1040          /* ES: removing this:
1041          BodyDecl b = c.substitutedBodyDecl(this);
1042          addBodyDecl(b);
1043          // Here we should access b through an ordinary
1044          // child accessor instead of setting is$Final directly,
1045          // however doing so appears to cause unexpected behaviour!
1046          b.is$Final = true;
1047          * and replacing with:
1048          */
1049          BodyDecl b = ((BodyDeclList)getBodyDeclList()).constructorCopy(c, this);
1050          set.add(b);
1051        }
1052        return set;
1053      }
1054      /**
1055       * @apilevel internal
1056       */
1057      public ASTNode rewriteTo() {
1058        return super.rewriteTo();
1059      }
1060    }