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