001    /* This file was generated with JastAdd2 (http://jastadd.org) version 2.1.13-12-g880e696 */
002    package org.extendj.ast;
003    
004    import java.util.HashSet;
005    import java.io.File;
006    import java.util.Set;
007    import java.util.Collections;
008    import java.util.Collection;
009    import java.util.ArrayList;
010    import beaver.*;
011    import java.util.*;
012    import java.io.ByteArrayOutputStream;
013    import java.io.PrintStream;
014    import java.lang.reflect.InvocationTargetException;
015    import java.lang.reflect.Method;
016    import org.jastadd.util.*;
017    import java.util.zip.*;
018    import java.io.*;
019    import org.jastadd.util.PrettyPrintable;
020    import org.jastadd.util.PrettyPrinter;
021    import java.io.FileNotFoundException;
022    import java.io.BufferedInputStream;
023    import java.io.DataInputStream;
024    /**
025     * @ast node
026     * @declaredat /home/jesper/git/extendj/java5/grammar/Generics.ast:10
027     * @production RawInterfaceDecl : {@link ParInterfaceDecl} ::= <span class="component">Argument:{@link Access}*</span>;
028    
029     */
030    public class RawInterfaceDecl extends ParInterfaceDecl implements Cloneable {
031      /**
032       * @aspect LookupParTypeDecl
033       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1066
034       */
035      public Access substitute(Parameterization parTypeDecl) {
036        return createBoundAccess();
037      }
038      /**
039       * @aspect LookupParTypeDecl
040       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1133
041       */
042      public Access substituteReturnType(Parameterization parTypeDecl) {
043        return createBoundAccess();
044      }
045      /**
046       * @aspect LookupParTypeDecl
047       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1161
048       */
049      public Access substituteParameterType(Parameterization parTypeDecl) {
050        return createBoundAccess();
051      }
052      /**
053       * @declaredat ASTNode:1
054       */
055      public RawInterfaceDecl() {
056        super();
057      }
058      /**
059       * Initializes the child array to the correct size.
060       * Initializes List and Opt nta children.
061       * @apilevel internal
062       * @ast method
063       * @declaredat ASTNode:10
064       */
065      public void init$Children() {
066        children = new ASTNode[4];
067        setChild(new List(), 1);
068        setChild(new List(), 2);
069        setChild(new List(), 3);
070      }
071      /**
072       * @declaredat ASTNode:16
073       */
074      public RawInterfaceDecl(Modifiers p0, String p1) {
075        setChild(p0, 0);
076        setID(p1);
077      }
078      /**
079       * @declaredat ASTNode:20
080       */
081      public RawInterfaceDecl(Modifiers p0, beaver.Symbol p1) {
082        setChild(p0, 0);
083        setID(p1);
084      }
085      /**
086       * @apilevel low-level
087       * @declaredat ASTNode:27
088       */
089      protected int numChildren() {
090        return 1;
091      }
092      /**
093       * @apilevel internal
094       * @declaredat ASTNode:33
095       */
096      public boolean mayHaveRewrite() {
097        return false;
098      }
099      /**
100       * @apilevel internal
101       * @declaredat ASTNode:39
102       */
103      public void flushAttrCache() {
104        super.flushAttrCache();
105        getArgumentList_reset();
106        subtype_TypeDecl_reset();
107        instanceOf_TypeDecl_reset();
108        strictSubtype_TypeDecl_reset();
109      }
110      /**
111       * @apilevel internal
112       * @declaredat ASTNode:49
113       */
114      public void flushCollectionCache() {
115        super.flushCollectionCache();
116      }
117      /**
118       * @apilevel internal
119       * @declaredat ASTNode:55
120       */
121      public void flushRewriteCache() {
122        super.flushRewriteCache();
123      }
124      /**
125       * @apilevel internal
126       * @declaredat ASTNode:61
127       */
128      public RawInterfaceDecl clone() throws CloneNotSupportedException {
129        RawInterfaceDecl node = (RawInterfaceDecl) super.clone();
130        return node;
131      }
132      /**
133       * @apilevel internal
134       * @declaredat ASTNode:68
135       */
136      public RawInterfaceDecl copy() {
137        try {
138          RawInterfaceDecl node = (RawInterfaceDecl) clone();
139          node.parent = null;
140          if (children != null) {
141            node.children = (ASTNode[]) children.clone();
142          }
143          return node;
144        } catch (CloneNotSupportedException e) {
145          throw new Error("Error: clone not supported for " + getClass().getName());
146        }
147      }
148      /**
149       * Create a deep copy of the AST subtree at this node.
150       * The copy is dangling, i.e. has no parent.
151       * @return dangling copy of the subtree at this node
152       * @apilevel low-level
153       * @deprecated Please use treeCopy or treeCopyNoTransform instead
154       * @declaredat ASTNode:87
155       */
156      @Deprecated
157      public RawInterfaceDecl fullCopy() {
158        return treeCopyNoTransform();
159      }
160      /**
161       * Create a deep copy of the AST subtree at this node.
162       * The copy is dangling, i.e. has no parent.
163       * @return dangling copy of the subtree at this node
164       * @apilevel low-level
165       * @declaredat ASTNode:97
166       */
167      public RawInterfaceDecl treeCopyNoTransform() {
168        RawInterfaceDecl tree = (RawInterfaceDecl) copy();
169        if (children != null) {
170          for (int i = 0; i < children.length; ++i) {
171            switch (i) {
172            case 1:
173            case 2:
174            case 3:
175              tree.children[i] = new List();
176              continue;
177            }
178            ASTNode child = (ASTNode) children[i];
179            if (child != null) {
180              child = child.treeCopyNoTransform();
181              tree.setChild(child, i);
182            }
183          }
184        }
185        return tree;
186      }
187      /**
188       * Create a deep copy of the AST subtree at this node.
189       * The subtree of this node is traversed to trigger rewrites before copy.
190       * The copy is dangling, i.e. has no parent.
191       * @return dangling copy of the subtree at this node
192       * @apilevel low-level
193       * @declaredat ASTNode:124
194       */
195      public RawInterfaceDecl treeCopy() {
196        doFullTraversal();
197        return treeCopyNoTransform();
198      }
199      /**
200       * @apilevel internal
201       * @declaredat ASTNode:131
202       */
203      protected boolean is$Equal(ASTNode node) {
204        return super.is$Equal(node) && (tokenString_ID == ((RawInterfaceDecl)node).tokenString_ID);    
205      }
206      /**
207       * Replaces the Modifiers child.
208       * @param node The new node to replace the Modifiers child.
209       * @apilevel high-level
210       */
211      public void setModifiers(Modifiers node) {
212        setChild(node, 0);
213      }
214      /**
215       * Retrieves the Modifiers child.
216       * @return The current node used as the Modifiers child.
217       * @apilevel high-level
218       */
219      @ASTNodeAnnotation.Child(name="Modifiers")
220      public Modifiers getModifiers() {
221        return (Modifiers) getChild(0);
222      }
223      /**
224       * Retrieves the Modifiers child.
225       * <p><em>This method does not invoke AST transformations.</em></p>
226       * @return The current node used as the Modifiers child.
227       * @apilevel low-level
228       */
229      public Modifiers getModifiersNoTransform() {
230        return (Modifiers) getChildNoTransform(0);
231      }
232      /**
233       * Replaces the lexeme ID.
234       * @param value The new value for the lexeme ID.
235       * @apilevel high-level
236       */
237      public void setID(String value) {
238        tokenString_ID = value;
239      }
240      /**
241       * JastAdd-internal setter for lexeme ID using the Beaver parser.
242       * @param symbol Symbol containing the new value for the lexeme ID
243       * @apilevel internal
244       */
245      public void setID(beaver.Symbol symbol) {
246        if (symbol.value != null && !(symbol.value instanceof String))
247        throw new UnsupportedOperationException("setID is only valid for String lexemes");
248        tokenString_ID = (String)symbol.value;
249        IDstart = symbol.getStart();
250        IDend = symbol.getEnd();
251      }
252      /**
253       * Retrieves the value for the lexeme ID.
254       * @return The value for the lexeme ID.
255       * @apilevel high-level
256       */
257      @ASTNodeAnnotation.Token(name="ID")
258      public String getID() {
259        return tokenString_ID != null ? tokenString_ID : "";
260      }
261      /**
262       * This method should not be called. This method throws an exception due to
263       * the corresponding child being an NTA shadowing a non-NTA child.
264       * @param node
265       * @apilevel internal
266       */
267      public void setSuperInterfaceList(List<Access> node) {
268        throw new Error("Can not replace NTA child SuperInterfaceList in RawInterfaceDecl!");
269      }
270      /**
271       * Retrieves the number of children in the SuperInterface list.
272       * @return Number of children in the SuperInterface list.
273       * @apilevel high-level
274       */
275      public int getNumSuperInterface() {
276        return getSuperInterfaceList().getNumChild();
277      }
278      /**
279       * Retrieves the number of children in the SuperInterface list.
280       * Calling this method will not trigger rewrites.
281       * @return Number of children in the SuperInterface list.
282       * @apilevel low-level
283       */
284      public int getNumSuperInterfaceNoTransform() {
285        return getSuperInterfaceListNoTransform().getNumChildNoTransform();
286      }
287      /**
288       * Retrieves the element at index {@code i} in the SuperInterface list.
289       * @param i Index of the element to return.
290       * @return The element at position {@code i} in the SuperInterface list.
291       * @apilevel high-level
292       */
293      public Access getSuperInterface(int i) {
294        return (Access) getSuperInterfaceList().getChild(i);
295      }
296      /**
297       * Check whether the SuperInterface list has any children.
298       * @return {@code true} if it has at least one child, {@code false} otherwise.
299       * @apilevel high-level
300       */
301      public boolean hasSuperInterface() {
302        return getSuperInterfaceList().getNumChild() != 0;
303      }
304      /**
305       * Append an element to the SuperInterface list.
306       * @param node The element to append to the SuperInterface list.
307       * @apilevel high-level
308       */
309      public void addSuperInterface(Access node) {
310        List<Access> list = (parent == null) ? getSuperInterfaceListNoTransform() : getSuperInterfaceList();
311        list.addChild(node);
312      }
313      /**
314       * @apilevel low-level
315       */
316      public void addSuperInterfaceNoTransform(Access node) {
317        List<Access> list = getSuperInterfaceListNoTransform();
318        list.addChild(node);
319      }
320      /**
321       * Replaces the SuperInterface list element at index {@code i} with the new node {@code node}.
322       * @param node The new node to replace the old list element.
323       * @param i The list index of the node to be replaced.
324       * @apilevel high-level
325       */
326      public void setSuperInterface(Access node, int i) {
327        List<Access> list = getSuperInterfaceList();
328        list.setChild(node, i);
329      }
330      /**
331       * Retrieves the child position of the SuperInterface list.
332       * @return The the child position of the SuperInterface list.
333       * @apilevel low-level
334       */
335      protected int getSuperInterfaceListChildPosition() {
336        return 1;
337      }
338      /**
339       * Retrieves the SuperInterface list.
340       * <p><em>This method does not invoke AST transformations.</em></p>
341       * @return The node representing the SuperInterface list.
342       * @apilevel low-level
343       */
344      public List<Access> getSuperInterfaceListNoTransform() {
345        return (List<Access>) getChildNoTransform(1);
346      }
347      /**
348       * Retrieves the SuperInterface list.
349       * @return The node representing the SuperInterface list.
350       * @apilevel high-level
351       */
352      public List<Access> getSuperInterfaces() {
353        return getSuperInterfaceList();
354      }
355      /**
356       * Retrieves the SuperInterface list.
357       * <p><em>This method does not invoke AST transformations.</em></p>
358       * @return The node representing the SuperInterface list.
359       * @apilevel low-level
360       */
361      public List<Access> getSuperInterfacesNoTransform() {
362        return getSuperInterfaceListNoTransform();
363      }
364      /**
365       * This method should not be called. This method throws an exception due to
366       * the corresponding child being an NTA shadowing a non-NTA child.
367       * @param node
368       * @apilevel internal
369       */
370      public void setBodyDeclList(List<BodyDecl> node) {
371        throw new Error("Can not replace NTA child BodyDeclList in RawInterfaceDecl!");
372      }
373      /**
374       * Retrieves the number of children in the BodyDecl list.
375       * @return Number of children in the BodyDecl list.
376       * @apilevel high-level
377       */
378      public int getNumBodyDecl() {
379        return getBodyDeclList().getNumChild();
380      }
381      /**
382       * Retrieves the number of children in the BodyDecl list.
383       * Calling this method will not trigger rewrites.
384       * @return Number of children in the BodyDecl list.
385       * @apilevel low-level
386       */
387      public int getNumBodyDeclNoTransform() {
388        return getBodyDeclListNoTransform().getNumChildNoTransform();
389      }
390      /**
391       * Retrieves the element at index {@code i} in the BodyDecl list.
392       * @param i Index of the element to return.
393       * @return The element at position {@code i} in the BodyDecl list.
394       * @apilevel high-level
395       */
396      public BodyDecl getBodyDecl(int i) {
397        return (BodyDecl) getBodyDeclList().getChild(i);
398      }
399      /**
400       * Check whether the BodyDecl list has any children.
401       * @return {@code true} if it has at least one child, {@code false} otherwise.
402       * @apilevel high-level
403       */
404      public boolean hasBodyDecl() {
405        return getBodyDeclList().getNumChild() != 0;
406      }
407      /**
408       * Append an element to the BodyDecl list.
409       * @param node The element to append to the BodyDecl list.
410       * @apilevel high-level
411       */
412      public void addBodyDecl(BodyDecl node) {
413        List<BodyDecl> list = (parent == null) ? getBodyDeclListNoTransform() : getBodyDeclList();
414        list.addChild(node);
415      }
416      /**
417       * @apilevel low-level
418       */
419      public void addBodyDeclNoTransform(BodyDecl node) {
420        List<BodyDecl> list = getBodyDeclListNoTransform();
421        list.addChild(node);
422      }
423      /**
424       * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}.
425       * @param node The new node to replace the old list element.
426       * @param i The list index of the node to be replaced.
427       * @apilevel high-level
428       */
429      public void setBodyDecl(BodyDecl node, int i) {
430        List<BodyDecl> list = getBodyDeclList();
431        list.setChild(node, i);
432      }
433      /**
434       * Retrieves the child position of the BodyDecl list.
435       * @return The the child position of the BodyDecl list.
436       * @apilevel low-level
437       */
438      protected int getBodyDeclListChildPosition() {
439        return 2;
440      }
441      /**
442       * Retrieves the BodyDecl list.
443       * <p><em>This method does not invoke AST transformations.</em></p>
444       * @return The node representing the BodyDecl list.
445       * @apilevel low-level
446       */
447      public List<BodyDecl> getBodyDeclListNoTransform() {
448        return (List<BodyDecl>) getChildNoTransform(2);
449      }
450      /**
451       * Retrieves the BodyDecl list.
452       * @return The node representing the BodyDecl list.
453       * @apilevel high-level
454       */
455      public List<BodyDecl> getBodyDecls() {
456        return getBodyDeclList();
457      }
458      /**
459       * Retrieves the BodyDecl list.
460       * <p><em>This method does not invoke AST transformations.</em></p>
461       * @return The node representing the BodyDecl list.
462       * @apilevel low-level
463       */
464      public List<BodyDecl> getBodyDeclsNoTransform() {
465        return getBodyDeclListNoTransform();
466      }
467      /**
468       * This method should not be called. This method throws an exception due to
469       * the corresponding child being an NTA shadowing a non-NTA child.
470       * @param node
471       * @apilevel internal
472       */
473      public void setArgumentList(List<Access> node) {
474        throw new Error("Can not replace NTA child ArgumentList in RawInterfaceDecl!");
475      }
476      /**
477       * Retrieves the number of children in the Argument list.
478       * @return Number of children in the Argument list.
479       * @apilevel high-level
480       */
481      public int getNumArgument() {
482        return getArgumentList().getNumChild();
483      }
484      /**
485       * Retrieves the number of children in the Argument list.
486       * Calling this method will not trigger rewrites.
487       * @return Number of children in the Argument list.
488       * @apilevel low-level
489       */
490      public int getNumArgumentNoTransform() {
491        return getArgumentListNoTransform().getNumChildNoTransform();
492      }
493      /**
494       * Retrieves the element at index {@code i} in the Argument list.
495       * @param i Index of the element to return.
496       * @return The element at position {@code i} in the Argument list.
497       * @apilevel high-level
498       */
499      public Access getArgument(int i) {
500        return (Access) getArgumentList().getChild(i);
501      }
502      /**
503       * Check whether the Argument list has any children.
504       * @return {@code true} if it has at least one child, {@code false} otherwise.
505       * @apilevel high-level
506       */
507      public boolean hasArgument() {
508        return getArgumentList().getNumChild() != 0;
509      }
510      /**
511       * Append an element to the Argument list.
512       * @param node The element to append to the Argument list.
513       * @apilevel high-level
514       */
515      public void addArgument(Access node) {
516        List<Access> list = (parent == null) ? getArgumentListNoTransform() : getArgumentList();
517        list.addChild(node);
518      }
519      /**
520       * @apilevel low-level
521       */
522      public void addArgumentNoTransform(Access node) {
523        List<Access> list = getArgumentListNoTransform();
524        list.addChild(node);
525      }
526      /**
527       * Replaces the Argument list element at index {@code i} with the new node {@code node}.
528       * @param node The new node to replace the old list element.
529       * @param i The list index of the node to be replaced.
530       * @apilevel high-level
531       */
532      public void setArgument(Access node, int i) {
533        List<Access> list = getArgumentList();
534        list.setChild(node, i);
535      }
536      /**
537       * Retrieves the child position of the Argument list.
538       * @return The the child position of the Argument list.
539       * @apilevel low-level
540       */
541      protected int getArgumentListChildPosition() {
542        return 3;
543      }
544      /**
545       * Retrieves the Argument list.
546       * <p><em>This method does not invoke AST transformations.</em></p>
547       * @return The node representing the Argument list.
548       * @apilevel low-level
549       */
550      public List<Access> getArgumentListNoTransform() {
551        return (List<Access>) getChildNoTransform(3);
552      }
553      /**
554       * Retrieves the Argument list.
555       * @return The node representing the Argument list.
556       * @apilevel high-level
557       */
558      public List<Access> getArguments() {
559        return getArgumentList();
560      }
561      /**
562       * Retrieves the Argument list.
563       * <p><em>This method does not invoke AST transformations.</em></p>
564       * @return The node representing the Argument list.
565       * @apilevel low-level
566       */
567      public List<Access> getArgumentsNoTransform() {
568        return getArgumentListNoTransform();
569      }
570      /**
571       * @attribute syn
572       * @aspect NestedTypes
573       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:624
574       */
575      @ASTNodeAnnotation.Attribute
576      public TypeDecl hostType() {
577        TypeDecl hostType_value = original();
578    
579        return hostType_value;
580      }
581      /**
582       * @attribute syn
583       * @aspect Generics
584       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:307
585       */
586      @ASTNodeAnnotation.Attribute
587      public boolean isRawType() {
588        boolean isRawType_value = true;
589    
590        return isRawType_value;
591      }
592      /**
593       * @attribute syn
594       * @aspect LookupParTypeDecl
595       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:816
596       */
597      @ASTNodeAnnotation.Attribute
598      public boolean sameSignature(Access a) {
599        boolean sameSignature_Access_value = a instanceof TypeAccess && a.type() == this;
600    
601        return sameSignature_Access_value;
602      }
603      /**
604       * @apilevel internal
605       */
606      protected boolean getArgumentList_computed = false;
607      /**
608       * @apilevel internal
609       */
610      protected List getArgumentList_value;
611      /**
612       * @apilevel internal
613       */
614      private void getArgumentList_reset() {
615        getArgumentList_computed = false;
616        getArgumentList_value = null;
617      }
618      /**
619       * @attribute syn nta
620       * @aspect LookupParTypeDecl
621       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:910
622       */
623      @ASTNodeAnnotation.Attribute
624      public List getArgumentList() {
625        ASTNode$State state = state();
626        if (getArgumentList_computed) {
627          return (List) getChild(getArgumentListChildPosition());
628        }
629        boolean intermediate = state.INTERMEDIATE_VALUE;
630        state.INTERMEDIATE_VALUE = false;
631        int num = state.boundariesCrossed;
632        boolean isFinal = this.is$Final();
633        getArgumentList_value = ((GenericInterfaceDecl) genericDecl()).createArgumentList(Collections.<TypeDecl>emptyList());
634        setChild(getArgumentList_value, getArgumentListChildPosition());
635        if (true) {
636          getArgumentList_computed = true;
637        } else {
638        }
639        state.INTERMEDIATE_VALUE |= intermediate;
640    
641        List node = (List) this.getChild(getArgumentListChildPosition());
642        return node;
643      }
644      /**
645       * @attribute syn
646       * @aspect GenericsParTypeDecl
647       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsParTypeDecl.jrag:55
648       */
649      @ASTNodeAnnotation.Attribute
650      public String nameWithArgs() {
651        String nameWithArgs_value = name();
652    
653        return nameWithArgs_value;
654      }
655      /**
656       * @attribute syn
657       * @aspect GenericsSubtype
658       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:40
659       */
660      @ASTNodeAnnotation.Attribute
661      public boolean supertypeGenericInterfaceDecl(GenericInterfaceDecl type) {
662        boolean supertypeGenericInterfaceDecl_GenericInterfaceDecl_value = type.subtype(genericDecl().original());
663    
664        return supertypeGenericInterfaceDecl_GenericInterfaceDecl_value;
665      }
666      /**
667       * @apilevel internal
668       */
669      private void subtype_TypeDecl_reset() {
670        subtype_TypeDecl_values = null;
671      }
672      protected java.util.Map subtype_TypeDecl_values;
673      @ASTNodeAnnotation.Attribute
674      public boolean subtype(TypeDecl type) {
675        Object _parameters = type;
676        if (subtype_TypeDecl_values == null) subtype_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
677        ASTNode$State.CircularValue _value;
678        if (subtype_TypeDecl_values.containsKey(_parameters)) {
679          Object _o = subtype_TypeDecl_values.get(_parameters);
680          if (!(_o instanceof ASTNode$State.CircularValue)) {
681            return (Boolean) _o;
682          } else {
683            _value = (ASTNode$State.CircularValue) _o;
684          }
685        } else {
686          _value = new ASTNode$State.CircularValue();
687          subtype_TypeDecl_values.put(_parameters, _value);
688          _value.value = true;
689        }
690        ASTNode$State state = state();
691        boolean new_subtype_TypeDecl_value;
692        if (!state.IN_CIRCLE) {
693          state.IN_CIRCLE = true;
694          int num = state.boundariesCrossed;
695          boolean isFinal = this.is$Final();
696          // TODO: fixme
697          // state().CIRCLE_INDEX = 1;
698          do {
699            _value.visited = state.CIRCLE_INDEX;
700            state.CHANGE = false;
701            new_subtype_TypeDecl_value = type.supertypeRawInterfaceDecl(this);
702            if (new_subtype_TypeDecl_value != ((Boolean)_value.value)) {
703              state.CHANGE = true;
704              _value.value = new_subtype_TypeDecl_value;
705            }
706            state.CIRCLE_INDEX++;
707          } while (state.CHANGE);
708          if (isFinal && num == state().boundariesCrossed) {
709            subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value);
710          } else {
711            subtype_TypeDecl_values.remove(_parameters);
712            state.RESET_CYCLE = true;
713            boolean $tmp = type.supertypeRawInterfaceDecl(this);
714            state.RESET_CYCLE = false;
715          }
716          state.IN_CIRCLE = false;
717          state.INTERMEDIATE_VALUE = false;
718          return new_subtype_TypeDecl_value;
719        }
720        if (state.CIRCLE_INDEX != _value.visited) {
721          _value.visited = state.CIRCLE_INDEX;
722          new_subtype_TypeDecl_value = type.supertypeRawInterfaceDecl(this);
723          if (state.RESET_CYCLE) {
724            subtype_TypeDecl_values.remove(_parameters);
725          }
726          else if (new_subtype_TypeDecl_value != ((Boolean)_value.value)) {
727            state.CHANGE = true;
728            _value.value = new_subtype_TypeDecl_value;
729          }
730          state.INTERMEDIATE_VALUE = true;
731          return new_subtype_TypeDecl_value;
732        }
733        state.INTERMEDIATE_VALUE = true;
734        return (Boolean) _value.value;
735      }
736      /**
737       * @attribute syn
738       * @aspect GenericsSubtype
739       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:448
740       */
741      @ASTNodeAnnotation.Attribute
742      public boolean supertypeClassDecl(ClassDecl type) {
743        boolean supertypeClassDecl_ClassDecl_value = type.subtype(genericDecl().original());
744    
745        return supertypeClassDecl_ClassDecl_value;
746      }
747      /**
748       * @attribute syn
749       * @aspect GenericsSubtype
750       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:465
751       */
752      @ASTNodeAnnotation.Attribute
753      public boolean supertypeInterfaceDecl(InterfaceDecl type) {
754        boolean supertypeInterfaceDecl_InterfaceDecl_value = type.subtype(genericDecl().original());
755    
756        return supertypeInterfaceDecl_InterfaceDecl_value;
757      }
758      /**
759       * @attribute syn
760       * @aspect GenericsSubtype
761       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:137
762       */
763      @ASTNodeAnnotation.Attribute
764      public boolean supertypeParInterfaceDecl(ParInterfaceDecl type) {
765        boolean supertypeParInterfaceDecl_ParInterfaceDecl_value = type.genericDecl().original().subtype(genericDecl().original());
766    
767        return supertypeParInterfaceDecl_ParInterfaceDecl_value;
768      }
769      /**
770       * @apilevel internal
771       */
772      protected java.util.Map instanceOf_TypeDecl_values;
773      /**
774       * @apilevel internal
775       */
776      private void instanceOf_TypeDecl_reset() {
777        instanceOf_TypeDecl_values = null;
778      }
779      /**
780       * @attribute syn
781       * @aspect TypeWideningAndIdentity
782       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:442
783       */
784      @ASTNodeAnnotation.Attribute
785      public boolean instanceOf(TypeDecl type) {
786        Object _parameters = type;
787        if (instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
788        ASTNode$State state = state();
789        if (instanceOf_TypeDecl_values.containsKey(_parameters)) {
790          return (Boolean) instanceOf_TypeDecl_values.get(_parameters);
791        }
792        boolean intermediate = state.INTERMEDIATE_VALUE;
793        state.INTERMEDIATE_VALUE = false;
794        int num = state.boundariesCrossed;
795        boolean isFinal = this.is$Final();
796        boolean instanceOf_TypeDecl_value = subtype(type);
797        if (isFinal && num == state().boundariesCrossed) {
798          instanceOf_TypeDecl_values.put(_parameters, instanceOf_TypeDecl_value);
799        } else {
800        }
801        state.INTERMEDIATE_VALUE |= intermediate;
802    
803        return instanceOf_TypeDecl_value;
804      }
805      /**
806       * A type is reifiable if it either refers to a non-parameterized type,
807       * is a raw type, is a parameterized type with only unbound wildcard
808       * parameters or is an array type with a reifiable type parameter.
809       * 
810       * @see "JLS SE7 &sect;4.7"
811       * @attribute syn
812       * @aspect ReifiableTypes
813       * @declaredat /home/jesper/git/extendj/java5/frontend/ReifiableTypes.jrag:39
814       */
815      @ASTNodeAnnotation.Attribute
816      public boolean isReifiable() {
817        boolean isReifiable_value = true;
818    
819        return isReifiable_value;
820      }
821      /**
822       * @attribute syn
823       * @aspect GenericsCodegen
824       * @declaredat /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:495
825       */
826      @ASTNodeAnnotation.Attribute
827      public String typeArgumentsOpt() {
828        String typeArgumentsOpt_value = "";
829    
830        return typeArgumentsOpt_value;
831      }
832      /**
833       * @attribute syn
834       * @aspect StrictSubtype
835       * @declaredat /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag:46
836       */
837      @ASTNodeAnnotation.Attribute
838      public boolean strictSupertypeGenericInterfaceDecl(GenericInterfaceDecl type) {
839        boolean strictSupertypeGenericInterfaceDecl_GenericInterfaceDecl_value = type.strictSubtype(genericDecl().original());
840    
841        return strictSupertypeGenericInterfaceDecl_GenericInterfaceDecl_value;
842      }
843      /**
844       * @apilevel internal
845       */
846      private void strictSubtype_TypeDecl_reset() {
847        strictSubtype_TypeDecl_values = null;
848      }
849      protected java.util.Map strictSubtype_TypeDecl_values;
850      @ASTNodeAnnotation.Attribute
851      public boolean strictSubtype(TypeDecl type) {
852        Object _parameters = type;
853        if (strictSubtype_TypeDecl_values == null) strictSubtype_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
854        ASTNode$State.CircularValue _value;
855        if (strictSubtype_TypeDecl_values.containsKey(_parameters)) {
856          Object _o = strictSubtype_TypeDecl_values.get(_parameters);
857          if (!(_o instanceof ASTNode$State.CircularValue)) {
858            return (Boolean) _o;
859          } else {
860            _value = (ASTNode$State.CircularValue) _o;
861          }
862        } else {
863          _value = new ASTNode$State.CircularValue();
864          strictSubtype_TypeDecl_values.put(_parameters, _value);
865          _value.value = true;
866        }
867        ASTNode$State state = state();
868        boolean new_strictSubtype_TypeDecl_value;
869        if (!state.IN_CIRCLE) {
870          state.IN_CIRCLE = true;
871          int num = state.boundariesCrossed;
872          boolean isFinal = this.is$Final();
873          // TODO: fixme
874          // state().CIRCLE_INDEX = 1;
875          do {
876            _value.visited = state.CIRCLE_INDEX;
877            state.CHANGE = false;
878            new_strictSubtype_TypeDecl_value = type.strictSupertypeRawInterfaceDecl(this);
879            if (new_strictSubtype_TypeDecl_value != ((Boolean)_value.value)) {
880              state.CHANGE = true;
881              _value.value = new_strictSubtype_TypeDecl_value;
882            }
883            state.CIRCLE_INDEX++;
884          } while (state.CHANGE);
885          if (isFinal && num == state().boundariesCrossed) {
886            strictSubtype_TypeDecl_values.put(_parameters, new_strictSubtype_TypeDecl_value);
887          } else {
888            strictSubtype_TypeDecl_values.remove(_parameters);
889            state.RESET_CYCLE = true;
890            boolean $tmp = type.strictSupertypeRawInterfaceDecl(this);
891            state.RESET_CYCLE = false;
892          }
893          state.IN_CIRCLE = false;
894          state.INTERMEDIATE_VALUE = false;
895          return new_strictSubtype_TypeDecl_value;
896        }
897        if (state.CIRCLE_INDEX != _value.visited) {
898          _value.visited = state.CIRCLE_INDEX;
899          new_strictSubtype_TypeDecl_value = type.strictSupertypeRawInterfaceDecl(this);
900          if (state.RESET_CYCLE) {
901            strictSubtype_TypeDecl_values.remove(_parameters);
902          }
903          else if (new_strictSubtype_TypeDecl_value != ((Boolean)_value.value)) {
904            state.CHANGE = true;
905            _value.value = new_strictSubtype_TypeDecl_value;
906          }
907          state.INTERMEDIATE_VALUE = true;
908          return new_strictSubtype_TypeDecl_value;
909        }
910        state.INTERMEDIATE_VALUE = true;
911        return (Boolean) _value.value;
912      }
913      /**
914       * @attribute syn
915       * @aspect StrictSubtype
916       * @declaredat /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag:370
917       */
918      @ASTNodeAnnotation.Attribute
919      public boolean strictSupertypeClassDecl(ClassDecl type) {
920        boolean strictSupertypeClassDecl_ClassDecl_value = type.strictSubtype(genericDecl().original());
921    
922        return strictSupertypeClassDecl_ClassDecl_value;
923      }
924      /**
925       * @attribute syn
926       * @aspect StrictSubtype
927       * @declaredat /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag:390
928       */
929      @ASTNodeAnnotation.Attribute
930      public boolean strictSupertypeInterfaceDecl(InterfaceDecl type) {
931        boolean strictSupertypeInterfaceDecl_InterfaceDecl_value = type.strictSubtype(genericDecl().original());
932    
933        return strictSupertypeInterfaceDecl_InterfaceDecl_value;
934      }
935      /**
936       * @attribute syn
937       * @aspect StrictSubtype
938       * @declaredat /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag:159
939       */
940      @ASTNodeAnnotation.Attribute
941      public boolean strictSupertypeParInterfaceDecl(ParInterfaceDecl type) {
942        boolean strictSupertypeParInterfaceDecl_ParInterfaceDecl_value = type.genericDecl().original().strictSubtype(genericDecl().original());
943    
944        return strictSupertypeParInterfaceDecl_ParInterfaceDecl_value;
945      }
946      /**
947       * @apilevel internal
948       */
949      public ASTNode rewriteTo() {
950        return super.rewriteTo();
951      }
952    }