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/java4/grammar/Java.ast:47
027     * @production UnknownType : {@link ClassDecl};
028    
029     */
030    public class UnknownType extends ClassDecl implements Cloneable {
031      /**
032       * @declaredat ASTNode:1
033       */
034      public UnknownType() {
035        super();
036      }
037      /**
038       * Initializes the child array to the correct size.
039       * Initializes List and Opt nta children.
040       * @apilevel internal
041       * @ast method
042       * @declaredat ASTNode:10
043       */
044      public void init$Children() {
045        children = new ASTNode[5];
046        setChild(new Opt(), 1);
047        setChild(new List(), 2);
048        setChild(new List(), 3);
049        setChild(new Opt(), 4);
050      }
051      /**
052       * @declaredat ASTNode:17
053       */
054      public UnknownType(Modifiers p0, String p1, Opt<Access> p2, List<Access> p3, List<BodyDecl> p4) {
055        setChild(p0, 0);
056        setID(p1);
057        setChild(p2, 1);
058        setChild(p3, 2);
059        setChild(p4, 3);
060      }
061      /**
062       * @declaredat ASTNode:24
063       */
064      public UnknownType(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<Access> p3, List<BodyDecl> p4) {
065        setChild(p0, 0);
066        setID(p1);
067        setChild(p2, 1);
068        setChild(p3, 2);
069        setChild(p4, 3);
070      }
071      /**
072       * @apilevel low-level
073       * @declaredat ASTNode:34
074       */
075      protected int numChildren() {
076        return 4;
077      }
078      /**
079       * @apilevel internal
080       * @declaredat ASTNode:40
081       */
082      public boolean mayHaveRewrite() {
083        return false;
084      }
085      /**
086       * @apilevel internal
087       * @declaredat ASTNode:46
088       */
089      public void flushAttrCache() {
090        super.flushAttrCache();
091        accessibleFromPackage_String_reset();
092        memberTypes_String_reset();
093        instanceOf_TypeDecl_reset();
094        typeDescriptor_reset();
095        subtype_TypeDecl_reset();
096        strictSubtype_TypeDecl_reset();
097      }
098      /**
099       * @apilevel internal
100       * @declaredat ASTNode:58
101       */
102      public void flushCollectionCache() {
103        super.flushCollectionCache();
104      }
105      /**
106       * @apilevel internal
107       * @declaredat ASTNode:64
108       */
109      public void flushRewriteCache() {
110        super.flushRewriteCache();
111      }
112      /**
113       * @apilevel internal
114       * @declaredat ASTNode:70
115       */
116      public UnknownType clone() throws CloneNotSupportedException {
117        UnknownType node = (UnknownType) super.clone();
118        return node;
119      }
120      /**
121       * @apilevel internal
122       * @declaredat ASTNode:77
123       */
124      public UnknownType copy() {
125        try {
126          UnknownType node = (UnknownType) clone();
127          node.parent = null;
128          if (children != null) {
129            node.children = (ASTNode[]) children.clone();
130          }
131          return node;
132        } catch (CloneNotSupportedException e) {
133          throw new Error("Error: clone not supported for " + getClass().getName());
134        }
135      }
136      /**
137       * Create a deep copy of the AST subtree at this node.
138       * The copy is dangling, i.e. has no parent.
139       * @return dangling copy of the subtree at this node
140       * @apilevel low-level
141       * @deprecated Please use treeCopy or treeCopyNoTransform instead
142       * @declaredat ASTNode:96
143       */
144      @Deprecated
145      public UnknownType fullCopy() {
146        return treeCopyNoTransform();
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       * @declaredat ASTNode:106
154       */
155      public UnknownType treeCopyNoTransform() {
156        UnknownType tree = (UnknownType) copy();
157        if (children != null) {
158          for (int i = 0; i < children.length; ++i) {
159            switch (i) {
160            case 4:
161              tree.children[i] = new Opt();
162              continue;
163            }
164            ASTNode child = (ASTNode) children[i];
165            if (child != null) {
166              child = child.treeCopyNoTransform();
167              tree.setChild(child, i);
168            }
169          }
170        }
171        return tree;
172      }
173      /**
174       * Create a deep copy of the AST subtree at this node.
175       * The subtree of this node is traversed to trigger rewrites before copy.
176       * The copy is dangling, i.e. has no parent.
177       * @return dangling copy of the subtree at this node
178       * @apilevel low-level
179       * @declaredat ASTNode:131
180       */
181      public UnknownType treeCopy() {
182        doFullTraversal();
183        return treeCopyNoTransform();
184      }
185      /**
186       * @apilevel internal
187       * @declaredat ASTNode:138
188       */
189      protected boolean is$Equal(ASTNode node) {
190        return super.is$Equal(node) && (tokenString_ID == ((UnknownType)node).tokenString_ID);    
191      }
192      /**
193       * Replaces the Modifiers child.
194       * @param node The new node to replace the Modifiers child.
195       * @apilevel high-level
196       */
197      public void setModifiers(Modifiers node) {
198        setChild(node, 0);
199      }
200      /**
201       * Retrieves the Modifiers child.
202       * @return The current node used as the Modifiers child.
203       * @apilevel high-level
204       */
205      @ASTNodeAnnotation.Child(name="Modifiers")
206      public Modifiers getModifiers() {
207        return (Modifiers) getChild(0);
208      }
209      /**
210       * Retrieves the Modifiers child.
211       * <p><em>This method does not invoke AST transformations.</em></p>
212       * @return The current node used as the Modifiers child.
213       * @apilevel low-level
214       */
215      public Modifiers getModifiersNoTransform() {
216        return (Modifiers) getChildNoTransform(0);
217      }
218      /**
219       * Replaces the lexeme ID.
220       * @param value The new value for the lexeme ID.
221       * @apilevel high-level
222       */
223      public void setID(String value) {
224        tokenString_ID = value;
225      }
226      /**
227       * JastAdd-internal setter for lexeme ID using the Beaver parser.
228       * @param symbol Symbol containing the new value for the lexeme ID
229       * @apilevel internal
230       */
231      public void setID(beaver.Symbol symbol) {
232        if (symbol.value != null && !(symbol.value instanceof String))
233        throw new UnsupportedOperationException("setID is only valid for String lexemes");
234        tokenString_ID = (String)symbol.value;
235        IDstart = symbol.getStart();
236        IDend = symbol.getEnd();
237      }
238      /**
239       * Retrieves the value for the lexeme ID.
240       * @return The value for the lexeme ID.
241       * @apilevel high-level
242       */
243      @ASTNodeAnnotation.Token(name="ID")
244      public String getID() {
245        return tokenString_ID != null ? tokenString_ID : "";
246      }
247      /**
248       * Replaces the optional node for the SuperClass child. This is the <code>Opt</code>
249       * node containing the child SuperClass, not the actual child!
250       * @param opt The new node to be used as the optional node for the SuperClass child.
251       * @apilevel low-level
252       */
253      public void setSuperClassOpt(Opt<Access> opt) {
254        setChild(opt, 1);
255      }
256      /**
257       * Replaces the (optional) SuperClass child.
258       * @param node The new node to be used as the SuperClass child.
259       * @apilevel high-level
260       */
261      public void setSuperClass(Access node) {
262        getSuperClassOpt().setChild(node, 0);
263      }
264      /**
265       * Check whether the optional SuperClass child exists.
266       * @return {@code true} if the optional SuperClass child exists, {@code false} if it does not.
267       * @apilevel high-level
268       */
269      public boolean hasSuperClass() {
270        return getSuperClassOpt().getNumChild() != 0;
271      }
272      /**
273       * Retrieves the (optional) SuperClass child.
274       * @return The SuperClass child, if it exists. Returns {@code null} otherwise.
275       * @apilevel low-level
276       */
277      public Access getSuperClass() {
278        return (Access) getSuperClassOpt().getChild(0);
279      }
280      /**
281       * Retrieves the optional node for the SuperClass child. This is the <code>Opt</code> node containing the child SuperClass, not the actual child!
282       * @return The optional node for child the SuperClass child.
283       * @apilevel low-level
284       */
285      @ASTNodeAnnotation.OptChild(name="SuperClass")
286      public Opt<Access> getSuperClassOpt() {
287        return (Opt<Access>) getChild(1);
288      }
289      /**
290       * Retrieves the optional node for child SuperClass. This is the <code>Opt</code> node containing the child SuperClass, not the actual child!
291       * <p><em>This method does not invoke AST transformations.</em></p>
292       * @return The optional node for child SuperClass.
293       * @apilevel low-level
294       */
295      public Opt<Access> getSuperClassOptNoTransform() {
296        return (Opt<Access>) getChildNoTransform(1);
297      }
298      /**
299       * Replaces the Implements list.
300       * @param list The new list node to be used as the Implements list.
301       * @apilevel high-level
302       */
303      public void setImplementsList(List<Access> list) {
304        setChild(list, 2);
305      }
306      /**
307       * Retrieves the number of children in the Implements list.
308       * @return Number of children in the Implements list.
309       * @apilevel high-level
310       */
311      public int getNumImplements() {
312        return getImplementsList().getNumChild();
313      }
314      /**
315       * Retrieves the number of children in the Implements list.
316       * Calling this method will not trigger rewrites.
317       * @return Number of children in the Implements list.
318       * @apilevel low-level
319       */
320      public int getNumImplementsNoTransform() {
321        return getImplementsListNoTransform().getNumChildNoTransform();
322      }
323      /**
324       * Retrieves the element at index {@code i} in the Implements list.
325       * @param i Index of the element to return.
326       * @return The element at position {@code i} in the Implements list.
327       * @apilevel high-level
328       */
329      public Access getImplements(int i) {
330        return (Access) getImplementsList().getChild(i);
331      }
332      /**
333       * Check whether the Implements list has any children.
334       * @return {@code true} if it has at least one child, {@code false} otherwise.
335       * @apilevel high-level
336       */
337      public boolean hasImplements() {
338        return getImplementsList().getNumChild() != 0;
339      }
340      /**
341       * Append an element to the Implements list.
342       * @param node The element to append to the Implements list.
343       * @apilevel high-level
344       */
345      public void addImplements(Access node) {
346        List<Access> list = (parent == null) ? getImplementsListNoTransform() : getImplementsList();
347        list.addChild(node);
348      }
349      /**
350       * @apilevel low-level
351       */
352      public void addImplementsNoTransform(Access node) {
353        List<Access> list = getImplementsListNoTransform();
354        list.addChild(node);
355      }
356      /**
357       * Replaces the Implements list element at index {@code i} with the new node {@code node}.
358       * @param node The new node to replace the old list element.
359       * @param i The list index of the node to be replaced.
360       * @apilevel high-level
361       */
362      public void setImplements(Access node, int i) {
363        List<Access> list = getImplementsList();
364        list.setChild(node, i);
365      }
366      /**
367       * Retrieves the Implements list.
368       * @return The node representing the Implements list.
369       * @apilevel high-level
370       */
371      @ASTNodeAnnotation.ListChild(name="Implements")
372      public List<Access> getImplementsList() {
373        List<Access> list = (List<Access>) getChild(2);
374        return list;
375      }
376      /**
377       * Retrieves the Implements list.
378       * <p><em>This method does not invoke AST transformations.</em></p>
379       * @return The node representing the Implements list.
380       * @apilevel low-level
381       */
382      public List<Access> getImplementsListNoTransform() {
383        return (List<Access>) getChildNoTransform(2);
384      }
385      /**
386       * Retrieves the Implements list.
387       * @return The node representing the Implements list.
388       * @apilevel high-level
389       */
390      public List<Access> getImplementss() {
391        return getImplementsList();
392      }
393      /**
394       * Retrieves the Implements list.
395       * <p><em>This method does not invoke AST transformations.</em></p>
396       * @return The node representing the Implements list.
397       * @apilevel low-level
398       */
399      public List<Access> getImplementssNoTransform() {
400        return getImplementsListNoTransform();
401      }
402      /**
403       * Replaces the BodyDecl list.
404       * @param list The new list node to be used as the BodyDecl list.
405       * @apilevel high-level
406       */
407      public void setBodyDeclList(List<BodyDecl> list) {
408        setChild(list, 3);
409      }
410      /**
411       * Retrieves the number of children in the BodyDecl list.
412       * @return Number of children in the BodyDecl list.
413       * @apilevel high-level
414       */
415      public int getNumBodyDecl() {
416        return getBodyDeclList().getNumChild();
417      }
418      /**
419       * Retrieves the number of children in the BodyDecl list.
420       * Calling this method will not trigger rewrites.
421       * @return Number of children in the BodyDecl list.
422       * @apilevel low-level
423       */
424      public int getNumBodyDeclNoTransform() {
425        return getBodyDeclListNoTransform().getNumChildNoTransform();
426      }
427      /**
428       * Retrieves the element at index {@code i} in the BodyDecl list.
429       * @param i Index of the element to return.
430       * @return The element at position {@code i} in the BodyDecl list.
431       * @apilevel high-level
432       */
433      public BodyDecl getBodyDecl(int i) {
434        return (BodyDecl) getBodyDeclList().getChild(i);
435      }
436      /**
437       * Check whether the BodyDecl list has any children.
438       * @return {@code true} if it has at least one child, {@code false} otherwise.
439       * @apilevel high-level
440       */
441      public boolean hasBodyDecl() {
442        return getBodyDeclList().getNumChild() != 0;
443      }
444      /**
445       * Append an element to the BodyDecl list.
446       * @param node The element to append to the BodyDecl list.
447       * @apilevel high-level
448       */
449      public void addBodyDecl(BodyDecl node) {
450        List<BodyDecl> list = (parent == null) ? getBodyDeclListNoTransform() : getBodyDeclList();
451        list.addChild(node);
452      }
453      /**
454       * @apilevel low-level
455       */
456      public void addBodyDeclNoTransform(BodyDecl node) {
457        List<BodyDecl> list = getBodyDeclListNoTransform();
458        list.addChild(node);
459      }
460      /**
461       * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}.
462       * @param node The new node to replace the old list element.
463       * @param i The list index of the node to be replaced.
464       * @apilevel high-level
465       */
466      public void setBodyDecl(BodyDecl node, int i) {
467        List<BodyDecl> list = getBodyDeclList();
468        list.setChild(node, i);
469      }
470      /**
471       * Retrieves the BodyDecl list.
472       * @return The node representing the BodyDecl list.
473       * @apilevel high-level
474       */
475      @ASTNodeAnnotation.ListChild(name="BodyDecl")
476      public List<BodyDecl> getBodyDeclList() {
477        List<BodyDecl> list = (List<BodyDecl>) getChild(3);
478        return list;
479      }
480      /**
481       * Retrieves the BodyDecl list.
482       * <p><em>This method does not invoke AST transformations.</em></p>
483       * @return The node representing the BodyDecl list.
484       * @apilevel low-level
485       */
486      public List<BodyDecl> getBodyDeclListNoTransform() {
487        return (List<BodyDecl>) getChildNoTransform(3);
488      }
489      /**
490       * Retrieves the BodyDecl list.
491       * @return The node representing the BodyDecl list.
492       * @apilevel high-level
493       */
494      public List<BodyDecl> getBodyDecls() {
495        return getBodyDeclList();
496      }
497      /**
498       * Retrieves the BodyDecl list.
499       * <p><em>This method does not invoke AST transformations.</em></p>
500       * @return The node representing the BodyDecl list.
501       * @apilevel low-level
502       */
503      public List<BodyDecl> getBodyDeclsNoTransform() {
504        return getBodyDeclListNoTransform();
505      }
506      /**
507       * Replaces the (optional) ImplicitConstructor child.
508       * @param node The new node to be used as the ImplicitConstructor child.
509       * @apilevel high-level
510       */
511      public void setImplicitConstructor(ConstructorDecl node) {
512        getImplicitConstructorOpt().setChild(node, 0);
513      }
514      /**
515       * Check whether the optional ImplicitConstructor child exists.
516       * @return {@code true} if the optional ImplicitConstructor child exists, {@code false} if it does not.
517       * @apilevel high-level
518       */
519      public boolean hasImplicitConstructor() {
520        return getImplicitConstructorOpt().getNumChild() != 0;
521      }
522      /**
523       * Retrieves the (optional) ImplicitConstructor child.
524       * @return The ImplicitConstructor child, if it exists. Returns {@code null} otherwise.
525       * @apilevel low-level
526       */
527      public ConstructorDecl getImplicitConstructor() {
528        return (ConstructorDecl) getImplicitConstructorOpt().getChild(0);
529      }
530      /**
531       * Retrieves the optional node for child ImplicitConstructor. This is the <code>Opt</code> node containing the child ImplicitConstructor, not the actual child!
532       * <p><em>This method does not invoke AST transformations.</em></p>
533       * @return The optional node for child ImplicitConstructor.
534       * @apilevel low-level
535       */
536      public Opt<ConstructorDecl> getImplicitConstructorOptNoTransform() {
537        return (Opt<ConstructorDecl>) getChildNoTransform(4);
538      }
539      /**
540       * Retrieves the child position of the optional child ImplicitConstructor.
541       * @return The the child position of the optional child ImplicitConstructor.
542       * @apilevel low-level
543       */
544      protected int getImplicitConstructorOptChildPosition() {
545        return 4;
546      }
547      /**
548       * @apilevel internal
549       */
550      protected java.util.Map accessibleFromPackage_String_values;
551      /**
552       * @apilevel internal
553       */
554      private void accessibleFromPackage_String_reset() {
555        accessibleFromPackage_String_values = null;
556      }
557      /**
558       * @attribute syn
559       * @aspect AccessControl
560       * @declaredat /home/jesper/git/extendj/java4/frontend/AccessControl.jrag:36
561       */
562      @ASTNodeAnnotation.Attribute
563      public boolean accessibleFromPackage(String packageName) {
564        Object _parameters = packageName;
565        if (accessibleFromPackage_String_values == null) accessibleFromPackage_String_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
566        ASTNode$State state = state();
567        if (accessibleFromPackage_String_values.containsKey(_parameters)) {
568          return (Boolean) accessibleFromPackage_String_values.get(_parameters);
569        }
570        boolean intermediate = state.INTERMEDIATE_VALUE;
571        state.INTERMEDIATE_VALUE = false;
572        int num = state.boundariesCrossed;
573        boolean isFinal = this.is$Final();
574        boolean accessibleFromPackage_String_value = false;
575        if (isFinal && num == state().boundariesCrossed) {
576          accessibleFromPackage_String_values.put(_parameters, accessibleFromPackage_String_value);
577        } else {
578        }
579        state.INTERMEDIATE_VALUE |= intermediate;
580    
581        return accessibleFromPackage_String_value;
582      }
583      /**
584       * @return a set containing this type, unless this is the unknown type in
585       * which case an empty set is returned
586       * @attribute syn
587       * @aspect TypeScopePropagation
588       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:300
589       */
590      @ASTNodeAnnotation.Attribute
591      public SimpleSet asSet() {
592        SimpleSet asSet_value = SimpleSet.emptySet;
593    
594        return asSet_value;
595      }
596      /**
597       * @apilevel internal
598       */
599      protected java.util.Map memberTypes_String_values;
600      /**
601       * @apilevel internal
602       */
603      private void memberTypes_String_reset() {
604        memberTypes_String_values = null;
605      }
606      /**
607       * @attribute syn
608       * @aspect TypeScopePropagation
609       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:619
610       */
611      @ASTNodeAnnotation.Attribute
612      public SimpleSet memberTypes(String name) {
613        Object _parameters = name;
614        if (memberTypes_String_values == null) memberTypes_String_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
615        ASTNode$State state = state();
616        if (memberTypes_String_values.containsKey(_parameters)) {
617          return (SimpleSet) memberTypes_String_values.get(_parameters);
618        }
619        boolean intermediate = state.INTERMEDIATE_VALUE;
620        state.INTERMEDIATE_VALUE = false;
621        int num = state.boundariesCrossed;
622        boolean isFinal = this.is$Final();
623        SimpleSet memberTypes_String_value = SimpleSet.emptySet;
624        if (isFinal && num == state().boundariesCrossed) {
625          memberTypes_String_values.put(_parameters, memberTypes_String_value);
626        } else {
627        }
628        state.INTERMEDIATE_VALUE |= intermediate;
629    
630        return memberTypes_String_value;
631      }
632      /**
633       * @attribute syn
634       * @aspect TypeAnalysis
635       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:187
636       */
637      @ASTNodeAnnotation.Attribute
638      public boolean isReferenceType() {
639        boolean isReferenceType_value = true;
640    
641        return isReferenceType_value;
642      }
643      /**
644       * @attribute syn
645       * @aspect TypeAnalysis
646       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:190
647       */
648      @ASTNodeAnnotation.Attribute
649      public boolean isPrimitiveType() {
650        boolean isPrimitiveType_value = true;
651    
652        return isPrimitiveType_value;
653      }
654      /**
655       * @attribute syn
656       * @aspect TypeAnalysis
657       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:195
658       */
659      @ASTNodeAnnotation.Attribute
660      public boolean isNumericType() {
661        boolean isNumericType_value = true;
662    
663        return isNumericType_value;
664      }
665      /**
666       * @attribute syn
667       * @aspect TypeAnalysis
668       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:199
669       */
670      @ASTNodeAnnotation.Attribute
671      public boolean isIntegralType() {
672        boolean isIntegralType_value = true;
673    
674        return isIntegralType_value;
675      }
676      /**
677       * @attribute syn
678       * @aspect TypeAnalysis
679       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:203
680       */
681      @ASTNodeAnnotation.Attribute
682      public boolean isBoolean() {
683        boolean isBoolean_value = true;
684    
685        return isBoolean_value;
686      }
687      /**
688       * @attribute syn
689       * @aspect TypeAnalysis
690       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:213
691       */
692      @ASTNodeAnnotation.Attribute
693      public boolean isInt() {
694        boolean isInt_value = true;
695    
696        return isInt_value;
697      }
698      /**
699       * @attribute syn
700       * @aspect TypeAnalysis
701       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:254
702       */
703      @ASTNodeAnnotation.Attribute
704      public boolean isUnknown() {
705        boolean isUnknown_value = true;
706    
707        return isUnknown_value;
708      }
709      /**
710       * @apilevel internal
711       */
712      protected java.util.Map instanceOf_TypeDecl_values;
713      /**
714       * @apilevel internal
715       */
716      private void instanceOf_TypeDecl_reset() {
717        instanceOf_TypeDecl_values = null;
718      }
719      /**
720       * @attribute syn
721       * @aspect TypeWideningAndIdentity
722       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:442
723       */
724      @ASTNodeAnnotation.Attribute
725      public boolean instanceOf(TypeDecl type) {
726        Object _parameters = type;
727        if (instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
728        ASTNode$State state = state();
729        if (instanceOf_TypeDecl_values.containsKey(_parameters)) {
730          return (Boolean) instanceOf_TypeDecl_values.get(_parameters);
731        }
732        boolean intermediate = state.INTERMEDIATE_VALUE;
733        state.INTERMEDIATE_VALUE = false;
734        int num = state.boundariesCrossed;
735        boolean isFinal = this.is$Final();
736        boolean instanceOf_TypeDecl_value = instanceOf_compute(type);
737        if (isFinal && num == state().boundariesCrossed) {
738          instanceOf_TypeDecl_values.put(_parameters, instanceOf_TypeDecl_value);
739        } else {
740        }
741        state.INTERMEDIATE_VALUE |= intermediate;
742    
743        return instanceOf_TypeDecl_value;
744      }
745      /**
746       * @apilevel internal
747       */
748      private boolean instanceOf_compute(TypeDecl type) { return subtype(type); }
749      /**
750       * @attribute syn
751       * @aspect TypeWideningAndIdentity
752       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:458
753       */
754      @ASTNodeAnnotation.Attribute
755      public boolean isSupertypeOfClassDecl(ClassDecl type) {
756        boolean isSupertypeOfClassDecl_ClassDecl_value = true;
757    
758        return isSupertypeOfClassDecl_ClassDecl_value;
759      }
760      /**
761       * @attribute syn
762       * @aspect TypeWideningAndIdentity
763       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:478
764       */
765      @ASTNodeAnnotation.Attribute
766      public boolean isSupertypeOfInterfaceDecl(InterfaceDecl type) {
767        boolean isSupertypeOfInterfaceDecl_InterfaceDecl_value = true;
768    
769        return isSupertypeOfInterfaceDecl_InterfaceDecl_value;
770      }
771      /**
772       * @attribute syn
773       * @aspect TypeWideningAndIdentity
774       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:493
775       */
776      @ASTNodeAnnotation.Attribute
777      public boolean isSupertypeOfArrayDecl(ArrayDecl type) {
778        boolean isSupertypeOfArrayDecl_ArrayDecl_value = true;
779    
780        return isSupertypeOfArrayDecl_ArrayDecl_value;
781      }
782      /**
783       * @attribute syn
784       * @aspect TypeWideningAndIdentity
785       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:519
786       */
787      @ASTNodeAnnotation.Attribute
788      public boolean isSupertypeOfPrimitiveType(PrimitiveType type) {
789        boolean isSupertypeOfPrimitiveType_PrimitiveType_value = true;
790    
791        return isSupertypeOfPrimitiveType_PrimitiveType_value;
792      }
793      /**
794       * @attribute syn
795       * @aspect TypeWideningAndIdentity
796       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:527
797       */
798      @ASTNodeAnnotation.Attribute
799      public boolean isSupertypeOfNullType(NullType type) {
800        boolean isSupertypeOfNullType_NullType_value = true;
801    
802        return isSupertypeOfNullType_NullType_value;
803      }
804      /**
805       * @apilevel internal
806       */
807      protected boolean typeDescriptor_computed = false;
808      /**
809       * @apilevel internal
810       */
811      protected String typeDescriptor_value;
812      /**
813       * @apilevel internal
814       */
815      private void typeDescriptor_reset() {
816        typeDescriptor_computed = false;
817        typeDescriptor_value = null;
818      }
819      /**
820       * @attribute syn
821       * @aspect ConstantPoolNames
822       * @declaredat /home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag:77
823       */
824      @ASTNodeAnnotation.Attribute
825      public String typeDescriptor() {
826        ASTNode$State state = state();
827        if (typeDescriptor_computed) {
828          return typeDescriptor_value;
829        }
830        boolean intermediate = state.INTERMEDIATE_VALUE;
831        state.INTERMEDIATE_VALUE = false;
832        int num = state.boundariesCrossed;
833        boolean isFinal = this.is$Final();
834        typeDescriptor_value = typeDescriptor_compute();
835        if (isFinal && num == state().boundariesCrossed) {
836          typeDescriptor_computed = true;
837        } else {
838        }
839        state.INTERMEDIATE_VALUE |= intermediate;
840    
841        return typeDescriptor_value;
842      }
843      /**
844       * @apilevel internal
845       */
846      private String typeDescriptor_compute() {
847          throw new Error("Trying to make a typeDescriptor() of Unknown");
848        }
849      /**
850       * @attribute syn
851       * @aspect NumericPromotion
852       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:167
853       */
854      @ASTNodeAnnotation.Attribute
855      public TypeDecl unaryNumericPromotion() {
856        TypeDecl unaryNumericPromotion_value = this;
857    
858        return unaryNumericPromotion_value;
859      }
860      /**
861       * @attribute syn
862       * @aspect NumericPromotion
863       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:175
864       */
865      @ASTNodeAnnotation.Attribute
866      public TypeDecl binaryNumericPromotion(TypeDecl type) {
867        TypeDecl binaryNumericPromotion_TypeDecl_value = this;
868    
869        return binaryNumericPromotion_TypeDecl_value;
870      }
871      /**
872       * @param bound the bounded type variable
873       * @param par a parameterization of the type for which the type variable
874       * occurs in the type parameter list
875       * @return {@code true} if this type is within the bounds of the parameter type
876       * @attribute syn
877       * @aspect GenericBoundCheck
878       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericBoundCheck.jrag:42
879       */
880      @ASTNodeAnnotation.Attribute
881      public boolean withinBounds(TypeDecl bound, Parameterization par) {
882        boolean withinBounds_TypeDecl_Parameterization_value = false;
883    
884        return withinBounds_TypeDecl_Parameterization_value;
885      }
886      /**
887       * @apilevel internal
888       */
889      private void subtype_TypeDecl_reset() {
890        subtype_TypeDecl_values = null;
891      }
892      protected java.util.Map subtype_TypeDecl_values;
893      @ASTNodeAnnotation.Attribute
894      public boolean subtype(TypeDecl type) {
895        Object _parameters = type;
896        if (subtype_TypeDecl_values == null) subtype_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
897        ASTNode$State.CircularValue _value;
898        if (subtype_TypeDecl_values.containsKey(_parameters)) {
899          Object _o = subtype_TypeDecl_values.get(_parameters);
900          if (!(_o instanceof ASTNode$State.CircularValue)) {
901            return (Boolean) _o;
902          } else {
903            _value = (ASTNode$State.CircularValue) _o;
904          }
905        } else {
906          _value = new ASTNode$State.CircularValue();
907          subtype_TypeDecl_values.put(_parameters, _value);
908          _value.value = true;
909        }
910        ASTNode$State state = state();
911        boolean new_subtype_TypeDecl_value;
912        if (!state.IN_CIRCLE) {
913          state.IN_CIRCLE = true;
914          int num = state.boundariesCrossed;
915          boolean isFinal = this.is$Final();
916          // TODO: fixme
917          // state().CIRCLE_INDEX = 1;
918          do {
919            _value.visited = state.CIRCLE_INDEX;
920            state.CHANGE = false;
921            new_subtype_TypeDecl_value = true;
922            if (new_subtype_TypeDecl_value != ((Boolean)_value.value)) {
923              state.CHANGE = true;
924              _value.value = new_subtype_TypeDecl_value;
925            }
926            state.CIRCLE_INDEX++;
927          } while (state.CHANGE);
928          if (isFinal && num == state().boundariesCrossed) {
929            subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value);
930          } else {
931            subtype_TypeDecl_values.remove(_parameters);
932            state.RESET_CYCLE = true;
933            boolean $tmp = true;
934            state.RESET_CYCLE = false;
935          }
936          state.IN_CIRCLE = false;
937          state.INTERMEDIATE_VALUE = false;
938          return new_subtype_TypeDecl_value;
939        }
940        if (state.CIRCLE_INDEX != _value.visited) {
941          _value.visited = state.CIRCLE_INDEX;
942          new_subtype_TypeDecl_value = true;
943          if (state.RESET_CYCLE) {
944            subtype_TypeDecl_values.remove(_parameters);
945          }
946          else if (new_subtype_TypeDecl_value != ((Boolean)_value.value)) {
947            state.CHANGE = true;
948            _value.value = new_subtype_TypeDecl_value;
949          }
950          state.INTERMEDIATE_VALUE = true;
951          return new_subtype_TypeDecl_value;
952        }
953        state.INTERMEDIATE_VALUE = true;
954        return (Boolean) _value.value;
955      }
956      /**
957       * @attribute syn
958       * @aspect GenericsSubtype
959       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:448
960       */
961      @ASTNodeAnnotation.Attribute
962      public boolean supertypeClassDecl(ClassDecl type) {
963        boolean supertypeClassDecl_ClassDecl_value = true;
964    
965        return supertypeClassDecl_ClassDecl_value;
966      }
967      /**
968       * @attribute syn
969       * @aspect GenericsSubtype
970       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:465
971       */
972      @ASTNodeAnnotation.Attribute
973      public boolean supertypeInterfaceDecl(InterfaceDecl type) {
974        boolean supertypeInterfaceDecl_InterfaceDecl_value = true;
975    
976        return supertypeInterfaceDecl_InterfaceDecl_value;
977      }
978      /**
979       * @attribute syn
980       * @aspect GenericsSubtype
981       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:480
982       */
983      @ASTNodeAnnotation.Attribute
984      public boolean supertypeArrayDecl(ArrayDecl type) {
985        boolean supertypeArrayDecl_ArrayDecl_value = true;
986    
987        return supertypeArrayDecl_ArrayDecl_value;
988      }
989      /**
990       * @attribute syn
991       * @aspect GenericsSubtype
992       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:506
993       */
994      @ASTNodeAnnotation.Attribute
995      public boolean supertypePrimitiveType(PrimitiveType type) {
996        boolean supertypePrimitiveType_PrimitiveType_value = true;
997    
998        return supertypePrimitiveType_PrimitiveType_value;
999      }
1000      /**
1001       * @attribute syn
1002       * @aspect GenericsSubtype
1003       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:514
1004       */
1005      @ASTNodeAnnotation.Attribute
1006      public boolean supertypeNullType(NullType type) {
1007        boolean supertypeNullType_NullType_value = true;
1008    
1009        return supertypeNullType_NullType_value;
1010      }
1011      /**
1012       * @apilevel internal
1013       */
1014      private void strictSubtype_TypeDecl_reset() {
1015        strictSubtype_TypeDecl_values = null;
1016      }
1017      protected java.util.Map strictSubtype_TypeDecl_values;
1018      @ASTNodeAnnotation.Attribute
1019      public boolean strictSubtype(TypeDecl type) {
1020        Object _parameters = type;
1021        if (strictSubtype_TypeDecl_values == null) strictSubtype_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
1022        ASTNode$State.CircularValue _value;
1023        if (strictSubtype_TypeDecl_values.containsKey(_parameters)) {
1024          Object _o = strictSubtype_TypeDecl_values.get(_parameters);
1025          if (!(_o instanceof ASTNode$State.CircularValue)) {
1026            return (Boolean) _o;
1027          } else {
1028            _value = (ASTNode$State.CircularValue) _o;
1029          }
1030        } else {
1031          _value = new ASTNode$State.CircularValue();
1032          strictSubtype_TypeDecl_values.put(_parameters, _value);
1033          _value.value = true;
1034        }
1035        ASTNode$State state = state();
1036        boolean new_strictSubtype_TypeDecl_value;
1037        if (!state.IN_CIRCLE) {
1038          state.IN_CIRCLE = true;
1039          int num = state.boundariesCrossed;
1040          boolean isFinal = this.is$Final();
1041          // TODO: fixme
1042          // state().CIRCLE_INDEX = 1;
1043          do {
1044            _value.visited = state.CIRCLE_INDEX;
1045            state.CHANGE = false;
1046            new_strictSubtype_TypeDecl_value = true;
1047            if (new_strictSubtype_TypeDecl_value != ((Boolean)_value.value)) {
1048              state.CHANGE = true;
1049              _value.value = new_strictSubtype_TypeDecl_value;
1050            }
1051            state.CIRCLE_INDEX++;
1052          } while (state.CHANGE);
1053          if (isFinal && num == state().boundariesCrossed) {
1054            strictSubtype_TypeDecl_values.put(_parameters, new_strictSubtype_TypeDecl_value);
1055          } else {
1056            strictSubtype_TypeDecl_values.remove(_parameters);
1057            state.RESET_CYCLE = true;
1058            boolean $tmp = true;
1059            state.RESET_CYCLE = false;
1060          }
1061          state.IN_CIRCLE = false;
1062          state.INTERMEDIATE_VALUE = false;
1063          return new_strictSubtype_TypeDecl_value;
1064        }
1065        if (state.CIRCLE_INDEX != _value.visited) {
1066          _value.visited = state.CIRCLE_INDEX;
1067          new_strictSubtype_TypeDecl_value = true;
1068          if (state.RESET_CYCLE) {
1069            strictSubtype_TypeDecl_values.remove(_parameters);
1070          }
1071          else if (new_strictSubtype_TypeDecl_value != ((Boolean)_value.value)) {
1072            state.CHANGE = true;
1073            _value.value = new_strictSubtype_TypeDecl_value;
1074          }
1075          state.INTERMEDIATE_VALUE = true;
1076          return new_strictSubtype_TypeDecl_value;
1077        }
1078        state.INTERMEDIATE_VALUE = true;
1079        return (Boolean) _value.value;
1080      }
1081      /**
1082       * @attribute syn
1083       * @aspect StrictSubtype
1084       * @declaredat /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag:370
1085       */
1086      @ASTNodeAnnotation.Attribute
1087      public boolean strictSupertypeClassDecl(ClassDecl type) {
1088        boolean strictSupertypeClassDecl_ClassDecl_value = true;
1089    
1090        return strictSupertypeClassDecl_ClassDecl_value;
1091      }
1092      /**
1093       * @attribute syn
1094       * @aspect StrictSubtype
1095       * @declaredat /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag:390
1096       */
1097      @ASTNodeAnnotation.Attribute
1098      public boolean strictSupertypeInterfaceDecl(InterfaceDecl type) {
1099        boolean strictSupertypeInterfaceDecl_InterfaceDecl_value = true;
1100    
1101        return strictSupertypeInterfaceDecl_InterfaceDecl_value;
1102      }
1103      /**
1104       * @attribute syn
1105       * @aspect StrictSubtype
1106       * @declaredat /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag:407
1107       */
1108      @ASTNodeAnnotation.Attribute
1109      public boolean strictSupertypeArrayDecl(ArrayDecl type) {
1110        boolean strictSupertypeArrayDecl_ArrayDecl_value = true;
1111    
1112        return strictSupertypeArrayDecl_ArrayDecl_value;
1113      }
1114      /**
1115       * @attribute syn
1116       * @aspect StrictSubtype
1117       * @declaredat /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag:437
1118       */
1119      @ASTNodeAnnotation.Attribute
1120      public boolean strictSupertypePrimitiveType(PrimitiveType type) {
1121        boolean strictSupertypePrimitiveType_PrimitiveType_value = true;
1122    
1123        return strictSupertypePrimitiveType_PrimitiveType_value;
1124      }
1125      /**
1126       * @attribute syn
1127       * @aspect StrictSubtype
1128       * @declaredat /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag:446
1129       */
1130      @ASTNodeAnnotation.Attribute
1131      public boolean strictSupertypeNullType(NullType type) {
1132        boolean strictSupertypeNullType_NullType_value = true;
1133    
1134        return strictSupertypeNullType_NullType_value;
1135      }
1136      /**
1137       * @apilevel internal
1138       */
1139      public ASTNode rewriteTo() {
1140        return super.rewriteTo();
1141      }
1142    }