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:65
027     * @production ArrayDecl : {@link ClassDecl};
028    
029     */
030    public class ArrayDecl extends ClassDecl implements Cloneable {
031      /**
032       * @aspect Arrays
033       * @declaredat /home/jesper/git/extendj/java4/frontend/Arrays.jrag:79
034       */
035      public Access createQualifiedAccess() {
036        return new ArrayTypeAccess(componentType().createQualifiedAccess());
037      }
038      /**
039       * @aspect LookupParTypeDecl
040       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1035
041       */
042      public Access substitute(Parameterization parTypeDecl) {
043        return new ArrayTypeAccess(componentType().substitute(parTypeDecl));
044      }
045      /**
046       * @aspect LookupParTypeDecl
047       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1088
048       */
049      public Access substituteReturnType(Parameterization parTypeDecl) {
050        return new ArrayTypeAccess(componentType().substituteReturnType(parTypeDecl));
051      }
052      /**
053       * @declaredat ASTNode:1
054       */
055      public ArrayDecl() {
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[5];
067        setChild(new Opt(), 1);
068        setChild(new List(), 2);
069        setChild(new List(), 3);
070        setChild(new Opt(), 4);
071      }
072      /**
073       * @declaredat ASTNode:17
074       */
075      public ArrayDecl(Modifiers p0, String p1, Opt<Access> p2, List<Access> p3, List<BodyDecl> p4) {
076        setChild(p0, 0);
077        setID(p1);
078        setChild(p2, 1);
079        setChild(p3, 2);
080        setChild(p4, 3);
081      }
082      /**
083       * @declaredat ASTNode:24
084       */
085      public ArrayDecl(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<Access> p3, List<BodyDecl> p4) {
086        setChild(p0, 0);
087        setID(p1);
088        setChild(p2, 1);
089        setChild(p3, 2);
090        setChild(p4, 3);
091      }
092      /**
093       * @apilevel low-level
094       * @declaredat ASTNode:34
095       */
096      protected int numChildren() {
097        return 4;
098      }
099      /**
100       * @apilevel internal
101       * @declaredat ASTNode:40
102       */
103      public boolean mayHaveRewrite() {
104        return false;
105      }
106      /**
107       * @apilevel internal
108       * @declaredat ASTNode:46
109       */
110      public void flushAttrCache() {
111        super.flushAttrCache();
112        accessibleFrom_TypeDecl_reset();
113        dimension_reset();
114        elementType_reset();
115        fullName_reset();
116        typeName_reset();
117        castingConversionTo_TypeDecl_reset();
118        instanceOf_TypeDecl_reset();
119        constantPoolName_reset();
120        typeDescriptor_reset();
121        jvmName_reset();
122        involvesTypeParameters_reset();
123        erasure_reset();
124        usesTypeVariable_reset();
125        subtype_TypeDecl_reset();
126        needsSignatureAttribute_reset();
127        fieldTypeSignature_reset();
128        classTypeSignature_reset();
129        strictSubtype_TypeDecl_reset();
130      }
131      /**
132       * @apilevel internal
133       * @declaredat ASTNode:70
134       */
135      public void flushCollectionCache() {
136        super.flushCollectionCache();
137      }
138      /**
139       * @apilevel internal
140       * @declaredat ASTNode:76
141       */
142      public void flushRewriteCache() {
143        super.flushRewriteCache();
144      }
145      /**
146       * @apilevel internal
147       * @declaredat ASTNode:82
148       */
149      public ArrayDecl clone() throws CloneNotSupportedException {
150        ArrayDecl node = (ArrayDecl) super.clone();
151        return node;
152      }
153      /**
154       * @apilevel internal
155       * @declaredat ASTNode:89
156       */
157      public ArrayDecl copy() {
158        try {
159          ArrayDecl node = (ArrayDecl) clone();
160          node.parent = null;
161          if (children != null) {
162            node.children = (ASTNode[]) children.clone();
163          }
164          return node;
165        } catch (CloneNotSupportedException e) {
166          throw new Error("Error: clone not supported for " + getClass().getName());
167        }
168      }
169      /**
170       * Create a deep copy of the AST subtree at this node.
171       * The copy is dangling, i.e. has no parent.
172       * @return dangling copy of the subtree at this node
173       * @apilevel low-level
174       * @deprecated Please use treeCopy or treeCopyNoTransform instead
175       * @declaredat ASTNode:108
176       */
177      @Deprecated
178      public ArrayDecl fullCopy() {
179        return treeCopyNoTransform();
180      }
181      /**
182       * Create a deep copy of the AST subtree at this node.
183       * The copy is dangling, i.e. has no parent.
184       * @return dangling copy of the subtree at this node
185       * @apilevel low-level
186       * @declaredat ASTNode:118
187       */
188      public ArrayDecl treeCopyNoTransform() {
189        ArrayDecl tree = (ArrayDecl) copy();
190        if (children != null) {
191          for (int i = 0; i < children.length; ++i) {
192            switch (i) {
193            case 4:
194              tree.children[i] = new Opt();
195              continue;
196            }
197            ASTNode child = (ASTNode) children[i];
198            if (child != null) {
199              child = child.treeCopyNoTransform();
200              tree.setChild(child, i);
201            }
202          }
203        }
204        return tree;
205      }
206      /**
207       * Create a deep copy of the AST subtree at this node.
208       * The subtree of this node is traversed to trigger rewrites before copy.
209       * The copy is dangling, i.e. has no parent.
210       * @return dangling copy of the subtree at this node
211       * @apilevel low-level
212       * @declaredat ASTNode:143
213       */
214      public ArrayDecl treeCopy() {
215        doFullTraversal();
216        return treeCopyNoTransform();
217      }
218      /**
219       * @apilevel internal
220       * @declaredat ASTNode:150
221       */
222      protected boolean is$Equal(ASTNode node) {
223        return super.is$Equal(node) && (tokenString_ID == ((ArrayDecl)node).tokenString_ID);    
224      }
225      /**
226       * Replaces the Modifiers child.
227       * @param node The new node to replace the Modifiers child.
228       * @apilevel high-level
229       */
230      public void setModifiers(Modifiers node) {
231        setChild(node, 0);
232      }
233      /**
234       * Retrieves the Modifiers child.
235       * @return The current node used as the Modifiers child.
236       * @apilevel high-level
237       */
238      @ASTNodeAnnotation.Child(name="Modifiers")
239      public Modifiers getModifiers() {
240        return (Modifiers) getChild(0);
241      }
242      /**
243       * Retrieves the Modifiers child.
244       * <p><em>This method does not invoke AST transformations.</em></p>
245       * @return The current node used as the Modifiers child.
246       * @apilevel low-level
247       */
248      public Modifiers getModifiersNoTransform() {
249        return (Modifiers) getChildNoTransform(0);
250      }
251      /**
252       * Replaces the lexeme ID.
253       * @param value The new value for the lexeme ID.
254       * @apilevel high-level
255       */
256      public void setID(String value) {
257        tokenString_ID = value;
258      }
259      /**
260       * JastAdd-internal setter for lexeme ID using the Beaver parser.
261       * @param symbol Symbol containing the new value for the lexeme ID
262       * @apilevel internal
263       */
264      public void setID(beaver.Symbol symbol) {
265        if (symbol.value != null && !(symbol.value instanceof String))
266        throw new UnsupportedOperationException("setID is only valid for String lexemes");
267        tokenString_ID = (String)symbol.value;
268        IDstart = symbol.getStart();
269        IDend = symbol.getEnd();
270      }
271      /**
272       * Retrieves the value for the lexeme ID.
273       * @return The value for the lexeme ID.
274       * @apilevel high-level
275       */
276      @ASTNodeAnnotation.Token(name="ID")
277      public String getID() {
278        return tokenString_ID != null ? tokenString_ID : "";
279      }
280      /**
281       * Replaces the optional node for the SuperClass child. This is the <code>Opt</code>
282       * node containing the child SuperClass, not the actual child!
283       * @param opt The new node to be used as the optional node for the SuperClass child.
284       * @apilevel low-level
285       */
286      public void setSuperClassOpt(Opt<Access> opt) {
287        setChild(opt, 1);
288      }
289      /**
290       * Replaces the (optional) SuperClass child.
291       * @param node The new node to be used as the SuperClass child.
292       * @apilevel high-level
293       */
294      public void setSuperClass(Access node) {
295        getSuperClassOpt().setChild(node, 0);
296      }
297      /**
298       * Check whether the optional SuperClass child exists.
299       * @return {@code true} if the optional SuperClass child exists, {@code false} if it does not.
300       * @apilevel high-level
301       */
302      public boolean hasSuperClass() {
303        return getSuperClassOpt().getNumChild() != 0;
304      }
305      /**
306       * Retrieves the (optional) SuperClass child.
307       * @return The SuperClass child, if it exists. Returns {@code null} otherwise.
308       * @apilevel low-level
309       */
310      public Access getSuperClass() {
311        return (Access) getSuperClassOpt().getChild(0);
312      }
313      /**
314       * Retrieves the optional node for the SuperClass child. This is the <code>Opt</code> node containing the child SuperClass, not the actual child!
315       * @return The optional node for child the SuperClass child.
316       * @apilevel low-level
317       */
318      @ASTNodeAnnotation.OptChild(name="SuperClass")
319      public Opt<Access> getSuperClassOpt() {
320        return (Opt<Access>) getChild(1);
321      }
322      /**
323       * Retrieves the optional node for child SuperClass. This is the <code>Opt</code> node containing the child SuperClass, not the actual child!
324       * <p><em>This method does not invoke AST transformations.</em></p>
325       * @return The optional node for child SuperClass.
326       * @apilevel low-level
327       */
328      public Opt<Access> getSuperClassOptNoTransform() {
329        return (Opt<Access>) getChildNoTransform(1);
330      }
331      /**
332       * Replaces the Implements list.
333       * @param list The new list node to be used as the Implements list.
334       * @apilevel high-level
335       */
336      public void setImplementsList(List<Access> list) {
337        setChild(list, 2);
338      }
339      /**
340       * Retrieves the number of children in the Implements list.
341       * @return Number of children in the Implements list.
342       * @apilevel high-level
343       */
344      public int getNumImplements() {
345        return getImplementsList().getNumChild();
346      }
347      /**
348       * Retrieves the number of children in the Implements list.
349       * Calling this method will not trigger rewrites.
350       * @return Number of children in the Implements list.
351       * @apilevel low-level
352       */
353      public int getNumImplementsNoTransform() {
354        return getImplementsListNoTransform().getNumChildNoTransform();
355      }
356      /**
357       * Retrieves the element at index {@code i} in the Implements list.
358       * @param i Index of the element to return.
359       * @return The element at position {@code i} in the Implements list.
360       * @apilevel high-level
361       */
362      public Access getImplements(int i) {
363        return (Access) getImplementsList().getChild(i);
364      }
365      /**
366       * Check whether the Implements list has any children.
367       * @return {@code true} if it has at least one child, {@code false} otherwise.
368       * @apilevel high-level
369       */
370      public boolean hasImplements() {
371        return getImplementsList().getNumChild() != 0;
372      }
373      /**
374       * Append an element to the Implements list.
375       * @param node The element to append to the Implements list.
376       * @apilevel high-level
377       */
378      public void addImplements(Access node) {
379        List<Access> list = (parent == null) ? getImplementsListNoTransform() : getImplementsList();
380        list.addChild(node);
381      }
382      /**
383       * @apilevel low-level
384       */
385      public void addImplementsNoTransform(Access node) {
386        List<Access> list = getImplementsListNoTransform();
387        list.addChild(node);
388      }
389      /**
390       * Replaces the Implements list element at index {@code i} with the new node {@code node}.
391       * @param node The new node to replace the old list element.
392       * @param i The list index of the node to be replaced.
393       * @apilevel high-level
394       */
395      public void setImplements(Access node, int i) {
396        List<Access> list = getImplementsList();
397        list.setChild(node, i);
398      }
399      /**
400       * Retrieves the Implements list.
401       * @return The node representing the Implements list.
402       * @apilevel high-level
403       */
404      @ASTNodeAnnotation.ListChild(name="Implements")
405      public List<Access> getImplementsList() {
406        List<Access> list = (List<Access>) getChild(2);
407        return list;
408      }
409      /**
410       * Retrieves the Implements list.
411       * <p><em>This method does not invoke AST transformations.</em></p>
412       * @return The node representing the Implements list.
413       * @apilevel low-level
414       */
415      public List<Access> getImplementsListNoTransform() {
416        return (List<Access>) getChildNoTransform(2);
417      }
418      /**
419       * Retrieves the Implements list.
420       * @return The node representing the Implements list.
421       * @apilevel high-level
422       */
423      public List<Access> getImplementss() {
424        return getImplementsList();
425      }
426      /**
427       * Retrieves the Implements list.
428       * <p><em>This method does not invoke AST transformations.</em></p>
429       * @return The node representing the Implements list.
430       * @apilevel low-level
431       */
432      public List<Access> getImplementssNoTransform() {
433        return getImplementsListNoTransform();
434      }
435      /**
436       * Replaces the BodyDecl list.
437       * @param list The new list node to be used as the BodyDecl list.
438       * @apilevel high-level
439       */
440      public void setBodyDeclList(List<BodyDecl> list) {
441        setChild(list, 3);
442      }
443      /**
444       * Retrieves the number of children in the BodyDecl list.
445       * @return Number of children in the BodyDecl list.
446       * @apilevel high-level
447       */
448      public int getNumBodyDecl() {
449        return getBodyDeclList().getNumChild();
450      }
451      /**
452       * Retrieves the number of children in the BodyDecl list.
453       * Calling this method will not trigger rewrites.
454       * @return Number of children in the BodyDecl list.
455       * @apilevel low-level
456       */
457      public int getNumBodyDeclNoTransform() {
458        return getBodyDeclListNoTransform().getNumChildNoTransform();
459      }
460      /**
461       * Retrieves the element at index {@code i} in the BodyDecl list.
462       * @param i Index of the element to return.
463       * @return The element at position {@code i} in the BodyDecl list.
464       * @apilevel high-level
465       */
466      public BodyDecl getBodyDecl(int i) {
467        return (BodyDecl) getBodyDeclList().getChild(i);
468      }
469      /**
470       * Check whether the BodyDecl list has any children.
471       * @return {@code true} if it has at least one child, {@code false} otherwise.
472       * @apilevel high-level
473       */
474      public boolean hasBodyDecl() {
475        return getBodyDeclList().getNumChild() != 0;
476      }
477      /**
478       * Append an element to the BodyDecl list.
479       * @param node The element to append to the BodyDecl list.
480       * @apilevel high-level
481       */
482      public void addBodyDecl(BodyDecl node) {
483        List<BodyDecl> list = (parent == null) ? getBodyDeclListNoTransform() : getBodyDeclList();
484        list.addChild(node);
485      }
486      /**
487       * @apilevel low-level
488       */
489      public void addBodyDeclNoTransform(BodyDecl node) {
490        List<BodyDecl> list = getBodyDeclListNoTransform();
491        list.addChild(node);
492      }
493      /**
494       * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}.
495       * @param node The new node to replace the old list element.
496       * @param i The list index of the node to be replaced.
497       * @apilevel high-level
498       */
499      public void setBodyDecl(BodyDecl node, int i) {
500        List<BodyDecl> list = getBodyDeclList();
501        list.setChild(node, i);
502      }
503      /**
504       * Retrieves the BodyDecl list.
505       * @return The node representing the BodyDecl list.
506       * @apilevel high-level
507       */
508      @ASTNodeAnnotation.ListChild(name="BodyDecl")
509      public List<BodyDecl> getBodyDeclList() {
510        List<BodyDecl> list = (List<BodyDecl>) getChild(3);
511        return list;
512      }
513      /**
514       * Retrieves the BodyDecl list.
515       * <p><em>This method does not invoke AST transformations.</em></p>
516       * @return The node representing the BodyDecl list.
517       * @apilevel low-level
518       */
519      public List<BodyDecl> getBodyDeclListNoTransform() {
520        return (List<BodyDecl>) getChildNoTransform(3);
521      }
522      /**
523       * Retrieves the BodyDecl list.
524       * @return The node representing the BodyDecl list.
525       * @apilevel high-level
526       */
527      public List<BodyDecl> getBodyDecls() {
528        return getBodyDeclList();
529      }
530      /**
531       * Retrieves the BodyDecl list.
532       * <p><em>This method does not invoke AST transformations.</em></p>
533       * @return The node representing the BodyDecl list.
534       * @apilevel low-level
535       */
536      public List<BodyDecl> getBodyDeclsNoTransform() {
537        return getBodyDeclListNoTransform();
538      }
539      /**
540       * Replaces the (optional) ImplicitConstructor child.
541       * @param node The new node to be used as the ImplicitConstructor child.
542       * @apilevel high-level
543       */
544      public void setImplicitConstructor(ConstructorDecl node) {
545        getImplicitConstructorOpt().setChild(node, 0);
546      }
547      /**
548       * Check whether the optional ImplicitConstructor child exists.
549       * @return {@code true} if the optional ImplicitConstructor child exists, {@code false} if it does not.
550       * @apilevel high-level
551       */
552      public boolean hasImplicitConstructor() {
553        return getImplicitConstructorOpt().getNumChild() != 0;
554      }
555      /**
556       * Retrieves the (optional) ImplicitConstructor child.
557       * @return The ImplicitConstructor child, if it exists. Returns {@code null} otherwise.
558       * @apilevel low-level
559       */
560      public ConstructorDecl getImplicitConstructor() {
561        return (ConstructorDecl) getImplicitConstructorOpt().getChild(0);
562      }
563      /**
564       * Retrieves the optional node for child ImplicitConstructor. This is the <code>Opt</code> node containing the child ImplicitConstructor, not the actual child!
565       * <p><em>This method does not invoke AST transformations.</em></p>
566       * @return The optional node for child ImplicitConstructor.
567       * @apilevel low-level
568       */
569      public Opt<ConstructorDecl> getImplicitConstructorOptNoTransform() {
570        return (Opt<ConstructorDecl>) getChildNoTransform(4);
571      }
572      /**
573       * Retrieves the child position of the optional child ImplicitConstructor.
574       * @return The the child position of the optional child ImplicitConstructor.
575       * @apilevel low-level
576       */
577      protected int getImplicitConstructorOptChildPosition() {
578        return 4;
579      }
580      /**
581       * @aspect TypeConversion
582       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:143
583       */
584      private boolean refined_TypeConversion_ArrayDecl_castingConversionTo_TypeDecl(TypeDecl type)
585    {
586        if (type.isArrayDecl()) {
587          TypeDecl SC = componentType();
588          TypeDecl TC = type.componentType();
589          if (SC.isPrimitiveType() && TC.isPrimitiveType() && SC == TC) {
590            return true;
591          }
592          if (SC.isReferenceType() && TC.isReferenceType()) {
593            return SC.castingConversionTo(TC);
594          }
595          return false;
596        } else if (type.isClassDecl()) {
597          return type.isObject();
598        } else if (type.isInterfaceDecl()) {
599          return type == typeSerializable() || type == typeCloneable();
600        } else return super.castingConversionTo(type);
601      }
602      /**
603       * @apilevel internal
604       */
605      protected java.util.Map accessibleFrom_TypeDecl_values;
606      /**
607       * @apilevel internal
608       */
609      private void accessibleFrom_TypeDecl_reset() {
610        accessibleFrom_TypeDecl_values = null;
611      }
612      /**
613       * @attribute syn
614       * @aspect AccessControl
615       * @declaredat /home/jesper/git/extendj/java4/frontend/AccessControl.jrag:34
616       */
617      @ASTNodeAnnotation.Attribute
618      public boolean accessibleFrom(TypeDecl type) {
619        Object _parameters = type;
620        if (accessibleFrom_TypeDecl_values == null) accessibleFrom_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
621        ASTNode$State state = state();
622        if (accessibleFrom_TypeDecl_values.containsKey(_parameters)) {
623          return (Boolean) accessibleFrom_TypeDecl_values.get(_parameters);
624        }
625        boolean intermediate = state.INTERMEDIATE_VALUE;
626        state.INTERMEDIATE_VALUE = false;
627        int num = state.boundariesCrossed;
628        boolean isFinal = this.is$Final();
629        boolean accessibleFrom_TypeDecl_value = elementType().accessibleFrom(type);
630        if (isFinal && num == state().boundariesCrossed) {
631          accessibleFrom_TypeDecl_values.put(_parameters, accessibleFrom_TypeDecl_value);
632        } else {
633        }
634        state.INTERMEDIATE_VALUE |= intermediate;
635    
636        return accessibleFrom_TypeDecl_value;
637      }
638      /**
639       * @apilevel internal
640       */
641      protected boolean dimension_computed = false;
642      /**
643       * @apilevel internal
644       */
645      protected int dimension_value;
646      /**
647       * @apilevel internal
648       */
649      private void dimension_reset() {
650        dimension_computed = false;
651      }
652      /**
653       * @attribute syn
654       * @aspect Arrays
655       * @declaredat /home/jesper/git/extendj/java4/frontend/Arrays.jrag:32
656       */
657      @ASTNodeAnnotation.Attribute
658      public int dimension() {
659        ASTNode$State state = state();
660        if (dimension_computed) {
661          return dimension_value;
662        }
663        boolean intermediate = state.INTERMEDIATE_VALUE;
664        state.INTERMEDIATE_VALUE = false;
665        int num = state.boundariesCrossed;
666        boolean isFinal = this.is$Final();
667        dimension_value = componentType().dimension() + 1;
668        if (isFinal && num == state().boundariesCrossed) {
669          dimension_computed = true;
670        } else {
671        }
672        state.INTERMEDIATE_VALUE |= intermediate;
673    
674        return dimension_value;
675      }
676      /**
677       * @apilevel internal
678       */
679      protected boolean elementType_computed = false;
680      /**
681       * @apilevel internal
682       */
683      protected TypeDecl elementType_value;
684      /**
685       * @apilevel internal
686       */
687      private void elementType_reset() {
688        elementType_computed = false;
689        elementType_value = null;
690      }
691      /**
692       * @attribute syn
693       * @aspect Arrays
694       * @declaredat /home/jesper/git/extendj/java4/frontend/Arrays.jrag:36
695       */
696      @ASTNodeAnnotation.Attribute
697      public TypeDecl elementType() {
698        ASTNode$State state = state();
699        if (elementType_computed) {
700          return elementType_value;
701        }
702        boolean intermediate = state.INTERMEDIATE_VALUE;
703        state.INTERMEDIATE_VALUE = false;
704        int num = state.boundariesCrossed;
705        boolean isFinal = this.is$Final();
706        elementType_value = componentType().elementType();
707        if (isFinal && num == state().boundariesCrossed) {
708          elementType_computed = true;
709        } else {
710        }
711        state.INTERMEDIATE_VALUE |= intermediate;
712    
713        return elementType_value;
714      }
715      /**
716       * @attribute syn
717       * @aspect TypeName
718       * @declaredat /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:78
719       */
720      @ASTNodeAnnotation.Attribute
721      public String name() {
722        String name_value = fullName();
723    
724        return name_value;
725      }
726      /**
727       * @apilevel internal
728       */
729      protected boolean fullName_computed = false;
730      /**
731       * @apilevel internal
732       */
733      protected String fullName_value;
734      /**
735       * @apilevel internal
736       */
737      private void fullName_reset() {
738        fullName_computed = false;
739        fullName_value = null;
740      }
741      /**
742       * @attribute syn
743       * @aspect TypeName
744       * @declaredat /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:80
745       */
746      @ASTNodeAnnotation.Attribute
747      public String fullName() {
748        ASTNode$State state = state();
749        if (fullName_computed) {
750          return fullName_value;
751        }
752        boolean intermediate = state.INTERMEDIATE_VALUE;
753        state.INTERMEDIATE_VALUE = false;
754        int num = state.boundariesCrossed;
755        boolean isFinal = this.is$Final();
756        fullName_value = getID();
757        if (isFinal && num == state().boundariesCrossed) {
758          fullName_computed = true;
759        } else {
760        }
761        state.INTERMEDIATE_VALUE |= intermediate;
762    
763        return fullName_value;
764      }
765      /**
766       * @apilevel internal
767       */
768      protected boolean typeName_computed = false;
769      /**
770       * @apilevel internal
771       */
772      protected String typeName_value;
773      /**
774       * @apilevel internal
775       */
776      private void typeName_reset() {
777        typeName_computed = false;
778        typeName_value = null;
779      }
780      /**
781       * @attribute syn
782       * @aspect TypeName
783       * @declaredat /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:91
784       */
785      @ASTNodeAnnotation.Attribute
786      public String typeName() {
787        ASTNode$State state = state();
788        if (typeName_computed) {
789          return typeName_value;
790        }
791        boolean intermediate = state.INTERMEDIATE_VALUE;
792        state.INTERMEDIATE_VALUE = false;
793        int num = state.boundariesCrossed;
794        boolean isFinal = this.is$Final();
795        typeName_value = componentType().typeName() + "[]";
796        if (isFinal && num == state().boundariesCrossed) {
797          typeName_computed = true;
798        } else {
799        }
800        state.INTERMEDIATE_VALUE |= intermediate;
801    
802        return typeName_value;
803      }
804      /**
805       * @apilevel internal
806       */
807      protected java.util.Map castingConversionTo_TypeDecl_values;
808      /**
809       * @apilevel internal
810       */
811      private void castingConversionTo_TypeDecl_reset() {
812        castingConversionTo_TypeDecl_values = null;
813      }
814      /**
815       * @attribute syn
816       * @aspect TypeConversion
817       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:109
818       */
819      @ASTNodeAnnotation.Attribute
820      public boolean castingConversionTo(TypeDecl type) {
821        Object _parameters = type;
822        if (castingConversionTo_TypeDecl_values == null) castingConversionTo_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
823        ASTNode$State state = state();
824        if (castingConversionTo_TypeDecl_values.containsKey(_parameters)) {
825          return (Boolean) castingConversionTo_TypeDecl_values.get(_parameters);
826        }
827        boolean intermediate = state.INTERMEDIATE_VALUE;
828        state.INTERMEDIATE_VALUE = false;
829        int num = state.boundariesCrossed;
830        boolean isFinal = this.is$Final();
831        boolean castingConversionTo_TypeDecl_value = castingConversionTo_compute(type);
832        if (isFinal && num == state().boundariesCrossed) {
833          castingConversionTo_TypeDecl_values.put(_parameters, castingConversionTo_TypeDecl_value);
834        } else {
835        }
836        state.INTERMEDIATE_VALUE |= intermediate;
837    
838        return castingConversionTo_TypeDecl_value;
839      }
840      /**
841       * @apilevel internal
842       */
843      private boolean castingConversionTo_compute(TypeDecl type) {
844          TypeDecl S = this;
845          TypeDecl T = type;
846          if (T instanceof TypeVariable) {
847            TypeVariable t = (TypeVariable) T;
848            if (!type.isReferenceType()) {
849              return false;
850            }
851            if (t.getNumTypeBound() == 0) {
852              return true;
853            }
854            for (int i = 0; i < t.getNumTypeBound(); i++) {
855              TypeDecl bound = t.getTypeBound(i).type();
856              if (bound.isObject() || bound == typeSerializable() || bound == typeCloneable()) {
857                return true;
858              }
859              if (bound.isTypeVariable() && castingConversionTo(bound)) {
860                return true;
861              }
862              if (bound.isArrayDecl() && castingConversionTo(bound)) {
863                return true;
864              }
865            }
866            return false;
867          } else {
868            return refined_TypeConversion_ArrayDecl_castingConversionTo_TypeDecl(type);
869          }
870        }
871      /**
872       * @attribute syn
873       * @aspect TypeAnalysis
874       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:231
875       */
876      @ASTNodeAnnotation.Attribute
877      public boolean isClassDecl() {
878        boolean isClassDecl_value = false;
879    
880        return isClassDecl_value;
881      }
882      /**
883       * @attribute syn
884       * @aspect TypeAnalysis
885       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:237
886       */
887      @ASTNodeAnnotation.Attribute
888      public boolean isArrayDecl() {
889        boolean isArrayDecl_value = true;
890    
891        return isArrayDecl_value;
892      }
893      /**
894       * @apilevel internal
895       */
896      protected java.util.Map instanceOf_TypeDecl_values;
897      /**
898       * @apilevel internal
899       */
900      private void instanceOf_TypeDecl_reset() {
901        instanceOf_TypeDecl_values = null;
902      }
903      /**
904       * @attribute syn
905       * @aspect TypeWideningAndIdentity
906       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:442
907       */
908      @ASTNodeAnnotation.Attribute
909      public boolean instanceOf(TypeDecl type) {
910        Object _parameters = type;
911        if (instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
912        ASTNode$State state = state();
913        if (instanceOf_TypeDecl_values.containsKey(_parameters)) {
914          return (Boolean) instanceOf_TypeDecl_values.get(_parameters);
915        }
916        boolean intermediate = state.INTERMEDIATE_VALUE;
917        state.INTERMEDIATE_VALUE = false;
918        int num = state.boundariesCrossed;
919        boolean isFinal = this.is$Final();
920        boolean instanceOf_TypeDecl_value = instanceOf_compute(type);
921        if (isFinal && num == state().boundariesCrossed) {
922          instanceOf_TypeDecl_values.put(_parameters, instanceOf_TypeDecl_value);
923        } else {
924        }
925        state.INTERMEDIATE_VALUE |= intermediate;
926    
927        return instanceOf_TypeDecl_value;
928      }
929      /**
930       * @apilevel internal
931       */
932      private boolean instanceOf_compute(TypeDecl type) { return subtype(type); }
933      /**
934       * @attribute syn
935       * @aspect TypeWideningAndIdentity
936       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:493
937       */
938      @ASTNodeAnnotation.Attribute
939      public boolean isSupertypeOfArrayDecl(ArrayDecl type) {
940        {
941            if (type.elementType().isPrimitive() && elementType().isPrimitive()) {
942              return type.dimension() == dimension() && type.elementType() == elementType();
943            }
944            return type.componentType().instanceOf(componentType());
945          }
946      }
947      /**
948       * @apilevel internal
949       */
950      protected boolean constantPoolName_computed = false;
951      /**
952       * @apilevel internal
953       */
954      protected String constantPoolName_value;
955      /**
956       * @apilevel internal
957       */
958      private void constantPoolName_reset() {
959        constantPoolName_computed = false;
960        constantPoolName_value = null;
961      }
962      /**
963       * @attribute syn
964       * @aspect ConstantPoolNames
965       * @declaredat /home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag:75
966       */
967      @ASTNodeAnnotation.Attribute
968      public String constantPoolName() {
969        ASTNode$State state = state();
970        if (constantPoolName_computed) {
971          return constantPoolName_value;
972        }
973        boolean intermediate = state.INTERMEDIATE_VALUE;
974        state.INTERMEDIATE_VALUE = false;
975        int num = state.boundariesCrossed;
976        boolean isFinal = this.is$Final();
977        constantPoolName_value = typeDescriptor();
978        if (isFinal && num == state().boundariesCrossed) {
979          constantPoolName_computed = true;
980        } else {
981        }
982        state.INTERMEDIATE_VALUE |= intermediate;
983    
984        return constantPoolName_value;
985      }
986      /**
987       * @apilevel internal
988       */
989      protected boolean typeDescriptor_computed = false;
990      /**
991       * @apilevel internal
992       */
993      protected String typeDescriptor_value;
994      /**
995       * @apilevel internal
996       */
997      private void typeDescriptor_reset() {
998        typeDescriptor_computed = false;
999        typeDescriptor_value = null;
1000      }
1001      /**
1002       * @attribute syn
1003       * @aspect ConstantPoolNames
1004       * @declaredat /home/jesper/git/extendj/java4/backend/ConstantPoolNames.jrag:77
1005       */
1006      @ASTNodeAnnotation.Attribute
1007      public String typeDescriptor() {
1008        ASTNode$State state = state();
1009        if (typeDescriptor_computed) {
1010          return typeDescriptor_value;
1011        }
1012        boolean intermediate = state.INTERMEDIATE_VALUE;
1013        state.INTERMEDIATE_VALUE = false;
1014        int num = state.boundariesCrossed;
1015        boolean isFinal = this.is$Final();
1016        typeDescriptor_value = typeDescriptor_compute();
1017        if (isFinal && num == state().boundariesCrossed) {
1018          typeDescriptor_computed = true;
1019        } else {
1020        }
1021        state.INTERMEDIATE_VALUE |= intermediate;
1022    
1023        return typeDescriptor_value;
1024      }
1025      /**
1026       * @apilevel internal
1027       */
1028      private String typeDescriptor_compute() {
1029          StringBuilder dim = new StringBuilder();
1030          for (int i = 0; i < dimension(); i++) {
1031            dim.append("[");
1032          }
1033          dim.append(elementType().typeDescriptor());
1034          return dim.toString();
1035        }
1036      /**
1037       * @attribute syn
1038       * @aspect CreateBCode
1039       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:900
1040       */
1041      @ASTNodeAnnotation.Attribute
1042      public String arrayTypeDescriptor() {
1043        String arrayTypeDescriptor_value = typeDescriptor();
1044    
1045        return arrayTypeDescriptor_value;
1046      }
1047      /**
1048       * @apilevel internal
1049       */
1050      protected boolean jvmName_computed = false;
1051      /**
1052       * @apilevel internal
1053       */
1054      protected String jvmName_value;
1055      /**
1056       * @apilevel internal
1057       */
1058      private void jvmName_reset() {
1059        jvmName_computed = false;
1060        jvmName_value = null;
1061      }
1062      /**
1063       * @attribute syn
1064       * @aspect Java2Rewrites
1065       * @declaredat /home/jesper/git/extendj/java4/backend/Java2Rewrites.jrag:36
1066       */
1067      @ASTNodeAnnotation.Attribute
1068      public String jvmName() {
1069        ASTNode$State state = state();
1070        if (jvmName_computed) {
1071          return jvmName_value;
1072        }
1073        boolean intermediate = state.INTERMEDIATE_VALUE;
1074        state.INTERMEDIATE_VALUE = false;
1075        int num = state.boundariesCrossed;
1076        boolean isFinal = this.is$Final();
1077        jvmName_value = jvmName_compute();
1078        if (isFinal && num == state().boundariesCrossed) {
1079          jvmName_computed = true;
1080        } else {
1081        }
1082        state.INTERMEDIATE_VALUE |= intermediate;
1083    
1084        return jvmName_value;
1085      }
1086      /**
1087       * @apilevel internal
1088       */
1089      private String jvmName_compute() {
1090          StringBuffer dim = new StringBuffer();
1091          for (int i = 0; i < dimension(); i++) {
1092            dim.append("[");
1093          }
1094          if (elementType().isReferenceType()) {
1095            return dim.toString() + "L" + elementType().jvmName() + ";";
1096          } else {
1097            return dim.toString() + elementType().jvmName();
1098          }
1099        }
1100      /**
1101       * @attribute syn
1102       * @aspect Java2Rewrites
1103       * @declaredat /home/jesper/git/extendj/java4/backend/Java2Rewrites.jrag:81
1104       */
1105      @ASTNodeAnnotation.Attribute
1106      public String referenceClassFieldName() {
1107        String referenceClassFieldName_value = "array" + jvmName().replace('[', '$').replace('.', '$').replace(';', ' ').trim();
1108    
1109        return referenceClassFieldName_value;
1110      }
1111      /**
1112       * @attribute syn
1113       * @aspect Annotations
1114       * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:151
1115       */
1116      @ASTNodeAnnotation.Attribute
1117      public boolean isValidAnnotationMethodReturnType() {
1118        boolean isValidAnnotationMethodReturnType_value = !componentType().isArrayDecl() && componentType().isValidAnnotationMethodReturnType();
1119    
1120        return isValidAnnotationMethodReturnType_value;
1121      }
1122      /**
1123       * @attribute syn
1124       * @aspect Annotations
1125       * @declaredat /home/jesper/git/extendj/java5/frontend/Annotations.jrag:557
1126       */
1127      @ASTNodeAnnotation.Attribute
1128      public boolean commensurateWith(ElementValue value) {
1129        boolean commensurateWith_ElementValue_value = value.commensurateWithArrayDecl(this);
1130    
1131        return commensurateWith_ElementValue_value;
1132      }
1133      /**
1134       * @apilevel internal
1135       */
1136      protected int involvesTypeParameters_visited = -1;
1137      /**
1138       * @apilevel internal
1139       */
1140      private void involvesTypeParameters_reset() {
1141        involvesTypeParameters_computed = false;
1142        involvesTypeParameters_initialized = false;
1143        involvesTypeParameters_visited = -1;
1144      }
1145      /**
1146       * @apilevel internal
1147       */
1148      protected boolean involvesTypeParameters_computed = false;
1149      /**
1150       * @apilevel internal
1151       */
1152      protected boolean involvesTypeParameters_initialized = false;
1153      /**
1154       * @apilevel internal
1155       */
1156      protected boolean involvesTypeParameters_value;
1157      @ASTNodeAnnotation.Attribute
1158      public boolean involvesTypeParameters() {
1159        if (involvesTypeParameters_computed) {
1160          return involvesTypeParameters_value;
1161        }
1162        ASTNode$State state = state();
1163        boolean new_involvesTypeParameters_value;
1164        if (!involvesTypeParameters_initialized) {
1165          involvesTypeParameters_initialized = true;
1166          involvesTypeParameters_value = false;
1167        }
1168        if (!state.IN_CIRCLE) {
1169          state.IN_CIRCLE = true;
1170          int num = state.boundariesCrossed;
1171          boolean isFinal = this.is$Final();
1172          do {
1173            involvesTypeParameters_visited = state.CIRCLE_INDEX;
1174            state.CHANGE = false;
1175            new_involvesTypeParameters_value = componentType().involvesTypeParameters();
1176            if (new_involvesTypeParameters_value != involvesTypeParameters_value) {
1177              state.CHANGE = true;
1178            }
1179            involvesTypeParameters_value = new_involvesTypeParameters_value;
1180            state.CIRCLE_INDEX++;
1181          } while (state.CHANGE);
1182          if (isFinal && num == state().boundariesCrossed) {
1183            involvesTypeParameters_computed = true;
1184          } else {
1185            state.RESET_CYCLE = true;
1186            boolean $tmp = componentType().involvesTypeParameters();
1187            state.RESET_CYCLE = false;
1188            involvesTypeParameters_computed = false;
1189            involvesTypeParameters_initialized = false;
1190          }
1191          state.IN_CIRCLE = false;
1192          state.INTERMEDIATE_VALUE = false;
1193          return involvesTypeParameters_value;
1194        }
1195        if (involvesTypeParameters_visited != state.CIRCLE_INDEX) {
1196          involvesTypeParameters_visited = state.CIRCLE_INDEX;
1197          if (state.RESET_CYCLE) {
1198            involvesTypeParameters_computed = false;
1199            involvesTypeParameters_initialized = false;
1200            involvesTypeParameters_visited = -1;
1201            return involvesTypeParameters_value;
1202          }
1203          new_involvesTypeParameters_value = componentType().involvesTypeParameters();
1204          if (new_involvesTypeParameters_value != involvesTypeParameters_value) {
1205            state.CHANGE = true;
1206          }
1207          involvesTypeParameters_value = new_involvesTypeParameters_value;
1208          state.INTERMEDIATE_VALUE = true;
1209          return involvesTypeParameters_value;
1210        }
1211        state.INTERMEDIATE_VALUE = true;
1212        return involvesTypeParameters_value;
1213      }
1214      /**
1215       * @apilevel internal
1216       */
1217      protected boolean erasure_computed = false;
1218      /**
1219       * @apilevel internal
1220       */
1221      protected TypeDecl erasure_value;
1222      /**
1223       * @apilevel internal
1224       */
1225      private void erasure_reset() {
1226        erasure_computed = false;
1227        erasure_value = null;
1228      }
1229      /**
1230       * @attribute syn
1231       * @aspect GenericsErasure
1232       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:422
1233       */
1234      @ASTNodeAnnotation.Attribute
1235      public TypeDecl erasure() {
1236        ASTNode$State state = state();
1237        if (erasure_computed) {
1238          return erasure_value;
1239        }
1240        boolean intermediate = state.INTERMEDIATE_VALUE;
1241        state.INTERMEDIATE_VALUE = false;
1242        int num = state.boundariesCrossed;
1243        boolean isFinal = this.is$Final();
1244        erasure_value = componentType().erasure().arrayType();
1245        if (isFinal && num == state().boundariesCrossed) {
1246          erasure_computed = true;
1247        } else {
1248        }
1249        state.INTERMEDIATE_VALUE |= intermediate;
1250    
1251        return erasure_value;
1252      }
1253      /**
1254       * @apilevel internal
1255       */
1256      protected int usesTypeVariable_visited = -1;
1257      /**
1258       * @apilevel internal
1259       */
1260      private void usesTypeVariable_reset() {
1261        usesTypeVariable_computed = false;
1262        usesTypeVariable_initialized = false;
1263        usesTypeVariable_visited = -1;
1264      }
1265      /**
1266       * @apilevel internal
1267       */
1268      protected boolean usesTypeVariable_computed = false;
1269      /**
1270       * @apilevel internal
1271       */
1272      protected boolean usesTypeVariable_initialized = false;
1273      /**
1274       * @apilevel internal
1275       */
1276      protected boolean usesTypeVariable_value;
1277      @ASTNodeAnnotation.Attribute
1278      public boolean usesTypeVariable() {
1279        if (usesTypeVariable_computed) {
1280          return usesTypeVariable_value;
1281        }
1282        ASTNode$State state = state();
1283        boolean new_usesTypeVariable_value;
1284        if (!usesTypeVariable_initialized) {
1285          usesTypeVariable_initialized = true;
1286          usesTypeVariable_value = false;
1287        }
1288        if (!state.IN_CIRCLE) {
1289          state.IN_CIRCLE = true;
1290          int num = state.boundariesCrossed;
1291          boolean isFinal = this.is$Final();
1292          do {
1293            usesTypeVariable_visited = state.CIRCLE_INDEX;
1294            state.CHANGE = false;
1295            new_usesTypeVariable_value = elementType().usesTypeVariable();
1296            if (new_usesTypeVariable_value != usesTypeVariable_value) {
1297              state.CHANGE = true;
1298            }
1299            usesTypeVariable_value = new_usesTypeVariable_value;
1300            state.CIRCLE_INDEX++;
1301          } while (state.CHANGE);
1302          if (isFinal && num == state().boundariesCrossed) {
1303            usesTypeVariable_computed = true;
1304          } else {
1305            state.RESET_CYCLE = true;
1306            boolean $tmp = elementType().usesTypeVariable();
1307            state.RESET_CYCLE = false;
1308            usesTypeVariable_computed = false;
1309            usesTypeVariable_initialized = false;
1310          }
1311          state.IN_CIRCLE = false;
1312          state.INTERMEDIATE_VALUE = false;
1313          return usesTypeVariable_value;
1314        }
1315        if (usesTypeVariable_visited != state.CIRCLE_INDEX) {
1316          usesTypeVariable_visited = state.CIRCLE_INDEX;
1317          if (state.RESET_CYCLE) {
1318            usesTypeVariable_computed = false;
1319            usesTypeVariable_initialized = false;
1320            usesTypeVariable_visited = -1;
1321            return usesTypeVariable_value;
1322          }
1323          new_usesTypeVariable_value = elementType().usesTypeVariable();
1324          if (new_usesTypeVariable_value != usesTypeVariable_value) {
1325            state.CHANGE = true;
1326          }
1327          usesTypeVariable_value = new_usesTypeVariable_value;
1328          state.INTERMEDIATE_VALUE = true;
1329          return usesTypeVariable_value;
1330        }
1331        state.INTERMEDIATE_VALUE = true;
1332        return usesTypeVariable_value;
1333      }
1334      /**
1335       * @apilevel internal
1336       */
1337      private void subtype_TypeDecl_reset() {
1338        subtype_TypeDecl_values = null;
1339      }
1340      protected java.util.Map subtype_TypeDecl_values;
1341      @ASTNodeAnnotation.Attribute
1342      public boolean subtype(TypeDecl type) {
1343        Object _parameters = type;
1344        if (subtype_TypeDecl_values == null) subtype_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
1345        ASTNode$State.CircularValue _value;
1346        if (subtype_TypeDecl_values.containsKey(_parameters)) {
1347          Object _o = subtype_TypeDecl_values.get(_parameters);
1348          if (!(_o instanceof ASTNode$State.CircularValue)) {
1349            return (Boolean) _o;
1350          } else {
1351            _value = (ASTNode$State.CircularValue) _o;
1352          }
1353        } else {
1354          _value = new ASTNode$State.CircularValue();
1355          subtype_TypeDecl_values.put(_parameters, _value);
1356          _value.value = true;
1357        }
1358        ASTNode$State state = state();
1359        boolean new_subtype_TypeDecl_value;
1360        if (!state.IN_CIRCLE) {
1361          state.IN_CIRCLE = true;
1362          int num = state.boundariesCrossed;
1363          boolean isFinal = this.is$Final();
1364          // TODO: fixme
1365          // state().CIRCLE_INDEX = 1;
1366          do {
1367            _value.visited = state.CIRCLE_INDEX;
1368            state.CHANGE = false;
1369            new_subtype_TypeDecl_value = type.supertypeArrayDecl(this);
1370            if (new_subtype_TypeDecl_value != ((Boolean)_value.value)) {
1371              state.CHANGE = true;
1372              _value.value = new_subtype_TypeDecl_value;
1373            }
1374            state.CIRCLE_INDEX++;
1375          } while (state.CHANGE);
1376          if (isFinal && num == state().boundariesCrossed) {
1377            subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value);
1378          } else {
1379            subtype_TypeDecl_values.remove(_parameters);
1380            state.RESET_CYCLE = true;
1381            boolean $tmp = type.supertypeArrayDecl(this);
1382            state.RESET_CYCLE = false;
1383          }
1384          state.IN_CIRCLE = false;
1385          state.INTERMEDIATE_VALUE = false;
1386          return new_subtype_TypeDecl_value;
1387        }
1388        if (state.CIRCLE_INDEX != _value.visited) {
1389          _value.visited = state.CIRCLE_INDEX;
1390          new_subtype_TypeDecl_value = type.supertypeArrayDecl(this);
1391          if (state.RESET_CYCLE) {
1392            subtype_TypeDecl_values.remove(_parameters);
1393          }
1394          else if (new_subtype_TypeDecl_value != ((Boolean)_value.value)) {
1395            state.CHANGE = true;
1396            _value.value = new_subtype_TypeDecl_value;
1397          }
1398          state.INTERMEDIATE_VALUE = true;
1399          return new_subtype_TypeDecl_value;
1400        }
1401        state.INTERMEDIATE_VALUE = true;
1402        return (Boolean) _value.value;
1403      }
1404      /**
1405       * @attribute syn
1406       * @aspect GenericsSubtype
1407       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericsSubtype.jrag:480
1408       */
1409      @ASTNodeAnnotation.Attribute
1410      public boolean supertypeArrayDecl(ArrayDecl type) {
1411        {
1412            if (type.elementType().isPrimitive() && elementType().isPrimitive()) {
1413              return type.dimension() == dimension() && type.elementType() == elementType();
1414            }
1415            return type.componentType().subtype(componentType());
1416          }
1417      }
1418      /**
1419       * A type is reifiable if it either refers to a non-parameterized type,
1420       * is a raw type, is a parameterized type with only unbound wildcard
1421       * parameters or is an array type with a reifiable type parameter.
1422       * 
1423       * @see "JLS SE7 &sect;4.7"
1424       * @attribute syn
1425       * @aspect ReifiableTypes
1426       * @declaredat /home/jesper/git/extendj/java5/frontend/ReifiableTypes.jrag:39
1427       */
1428      @ASTNodeAnnotation.Attribute
1429      public boolean isReifiable() {
1430        boolean isReifiable_value = componentType().isReifiable();
1431    
1432        return isReifiable_value;
1433      }
1434      /**
1435       * @apilevel internal
1436       */
1437      protected boolean needsSignatureAttribute_computed = false;
1438      /**
1439       * @apilevel internal
1440       */
1441      protected boolean needsSignatureAttribute_value;
1442      /**
1443       * @apilevel internal
1444       */
1445      private void needsSignatureAttribute_reset() {
1446        needsSignatureAttribute_computed = false;
1447      }
1448      /**
1449       * @attribute syn
1450       * @aspect GenericsCodegen
1451       * @declaredat /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:345
1452       */
1453      @ASTNodeAnnotation.Attribute
1454      public boolean needsSignatureAttribute() {
1455        ASTNode$State state = state();
1456        if (needsSignatureAttribute_computed) {
1457          return needsSignatureAttribute_value;
1458        }
1459        boolean intermediate = state.INTERMEDIATE_VALUE;
1460        state.INTERMEDIATE_VALUE = false;
1461        int num = state.boundariesCrossed;
1462        boolean isFinal = this.is$Final();
1463        needsSignatureAttribute_value = elementType().needsSignatureAttribute();
1464        if (isFinal && num == state().boundariesCrossed) {
1465          needsSignatureAttribute_computed = true;
1466        } else {
1467        }
1468        state.INTERMEDIATE_VALUE |= intermediate;
1469    
1470        return needsSignatureAttribute_value;
1471      }
1472      /**
1473       * @apilevel internal
1474       */
1475      protected boolean fieldTypeSignature_computed = false;
1476      /**
1477       * @apilevel internal
1478       */
1479      protected String fieldTypeSignature_value;
1480      /**
1481       * @apilevel internal
1482       */
1483      private void fieldTypeSignature_reset() {
1484        fieldTypeSignature_computed = false;
1485        fieldTypeSignature_value = null;
1486      }
1487      /**
1488       * @attribute syn
1489       * @aspect GenericsCodegen
1490       * @declaredat /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:467
1491       */
1492      @ASTNodeAnnotation.Attribute
1493      public String fieldTypeSignature() {
1494        ASTNode$State state = state();
1495        if (fieldTypeSignature_computed) {
1496          return fieldTypeSignature_value;
1497        }
1498        boolean intermediate = state.INTERMEDIATE_VALUE;
1499        state.INTERMEDIATE_VALUE = false;
1500        int num = state.boundariesCrossed;
1501        boolean isFinal = this.is$Final();
1502        fieldTypeSignature_value = "[" + componentType().fieldTypeSignature();
1503        if (isFinal && num == state().boundariesCrossed) {
1504          fieldTypeSignature_computed = true;
1505        } else {
1506        }
1507        state.INTERMEDIATE_VALUE |= intermediate;
1508    
1509        return fieldTypeSignature_value;
1510      }
1511      /**
1512       * @apilevel internal
1513       */
1514      protected boolean classTypeSignature_computed = false;
1515      /**
1516       * @apilevel internal
1517       */
1518      protected String classTypeSignature_value;
1519      /**
1520       * @apilevel internal
1521       */
1522      private void classTypeSignature_reset() {
1523        classTypeSignature_computed = false;
1524        classTypeSignature_value = null;
1525      }
1526      /**
1527       * @attribute syn
1528       * @aspect GenericsCodegen
1529       * @declaredat /home/jesper/git/extendj/java5/backend/GenericsCodegen.jrag:476
1530       */
1531      @ASTNodeAnnotation.Attribute
1532      public String classTypeSignature() {
1533        ASTNode$State state = state();
1534        if (classTypeSignature_computed) {
1535          return classTypeSignature_value;
1536        }
1537        boolean intermediate = state.INTERMEDIATE_VALUE;
1538        state.INTERMEDIATE_VALUE = false;
1539        int num = state.boundariesCrossed;
1540        boolean isFinal = this.is$Final();
1541        classTypeSignature_value = "[" + componentType().classTypeSignature();
1542        if (isFinal && num == state().boundariesCrossed) {
1543          classTypeSignature_computed = true;
1544        } else {
1545        }
1546        state.INTERMEDIATE_VALUE |= intermediate;
1547    
1548        return classTypeSignature_value;
1549      }
1550      /**
1551       * @apilevel internal
1552       */
1553      private void strictSubtype_TypeDecl_reset() {
1554        strictSubtype_TypeDecl_values = null;
1555      }
1556      protected java.util.Map strictSubtype_TypeDecl_values;
1557      @ASTNodeAnnotation.Attribute
1558      public boolean strictSubtype(TypeDecl type) {
1559        Object _parameters = type;
1560        if (strictSubtype_TypeDecl_values == null) strictSubtype_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
1561        ASTNode$State.CircularValue _value;
1562        if (strictSubtype_TypeDecl_values.containsKey(_parameters)) {
1563          Object _o = strictSubtype_TypeDecl_values.get(_parameters);
1564          if (!(_o instanceof ASTNode$State.CircularValue)) {
1565            return (Boolean) _o;
1566          } else {
1567            _value = (ASTNode$State.CircularValue) _o;
1568          }
1569        } else {
1570          _value = new ASTNode$State.CircularValue();
1571          strictSubtype_TypeDecl_values.put(_parameters, _value);
1572          _value.value = true;
1573        }
1574        ASTNode$State state = state();
1575        boolean new_strictSubtype_TypeDecl_value;
1576        if (!state.IN_CIRCLE) {
1577          state.IN_CIRCLE = true;
1578          int num = state.boundariesCrossed;
1579          boolean isFinal = this.is$Final();
1580          // TODO: fixme
1581          // state().CIRCLE_INDEX = 1;
1582          do {
1583            _value.visited = state.CIRCLE_INDEX;
1584            state.CHANGE = false;
1585            new_strictSubtype_TypeDecl_value = type.strictSupertypeArrayDecl(this);
1586            if (new_strictSubtype_TypeDecl_value != ((Boolean)_value.value)) {
1587              state.CHANGE = true;
1588              _value.value = new_strictSubtype_TypeDecl_value;
1589            }
1590            state.CIRCLE_INDEX++;
1591          } while (state.CHANGE);
1592          if (isFinal && num == state().boundariesCrossed) {
1593            strictSubtype_TypeDecl_values.put(_parameters, new_strictSubtype_TypeDecl_value);
1594          } else {
1595            strictSubtype_TypeDecl_values.remove(_parameters);
1596            state.RESET_CYCLE = true;
1597            boolean $tmp = type.strictSupertypeArrayDecl(this);
1598            state.RESET_CYCLE = false;
1599          }
1600          state.IN_CIRCLE = false;
1601          state.INTERMEDIATE_VALUE = false;
1602          return new_strictSubtype_TypeDecl_value;
1603        }
1604        if (state.CIRCLE_INDEX != _value.visited) {
1605          _value.visited = state.CIRCLE_INDEX;
1606          new_strictSubtype_TypeDecl_value = type.strictSupertypeArrayDecl(this);
1607          if (state.RESET_CYCLE) {
1608            strictSubtype_TypeDecl_values.remove(_parameters);
1609          }
1610          else if (new_strictSubtype_TypeDecl_value != ((Boolean)_value.value)) {
1611            state.CHANGE = true;
1612            _value.value = new_strictSubtype_TypeDecl_value;
1613          }
1614          state.INTERMEDIATE_VALUE = true;
1615          return new_strictSubtype_TypeDecl_value;
1616        }
1617        state.INTERMEDIATE_VALUE = true;
1618        return (Boolean) _value.value;
1619      }
1620      /**
1621       * @attribute syn
1622       * @aspect StrictSubtype
1623       * @declaredat /home/jesper/git/extendj/java8/frontend/GenericsSubtype.jrag:407
1624       */
1625      @ASTNodeAnnotation.Attribute
1626      public boolean strictSupertypeArrayDecl(ArrayDecl type) {
1627        {
1628            if (type.elementType().isPrimitive() && elementType().isPrimitive()) {
1629              return type.dimension() == dimension() && type.elementType() == elementType();
1630            }
1631            return type.componentType().strictSubtype(componentType());
1632          }
1633      }
1634      /**
1635       * @attribute inh
1636       * @aspect TypeConversion
1637       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:161
1638       */
1639      /**
1640       * @attribute inh
1641       * @aspect TypeConversion
1642       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:161
1643       */
1644      @ASTNodeAnnotation.Attribute
1645      public TypeDecl typeSerializable() {
1646        TypeDecl typeSerializable_value = getParent().Define_typeSerializable(this, null);
1647    
1648        return typeSerializable_value;
1649      }
1650      /**
1651       * @attribute inh
1652       * @aspect TypeConversion
1653       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:162
1654       */
1655      /**
1656       * @attribute inh
1657       * @aspect TypeConversion
1658       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:162
1659       */
1660      @ASTNodeAnnotation.Attribute
1661      public TypeDecl typeCloneable() {
1662        TypeDecl typeCloneable_value = getParent().Define_typeCloneable(this, null);
1663    
1664        return typeCloneable_value;
1665      }
1666      /**
1667       * @apilevel internal
1668       */
1669      public ASTNode rewriteTo() {
1670        return super.rewriteTo();
1671      }
1672    }