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:6
027     * @production PrimitiveCompilationUnit : {@link CompilationUnit};
028    
029     */
030    public class PrimitiveCompilationUnit extends CompilationUnit implements Cloneable {
031      /**
032       * @declaredat ASTNode:1
033       */
034      public PrimitiveCompilationUnit() {
035        super();
036      }
037      /**
038       * Initializes the child array to the correct size.
039       * Initializes List and Opt nta children.
040       * @apilevel internal
041       * @ast method
042       * @declaredat ASTNode:10
043       */
044      public void init$Children() {
045        children = new ASTNode[2];
046        setChild(new List(), 0);
047        setChild(new List(), 1);
048      }
049      /**
050       * @declaredat ASTNode:15
051       */
052      public PrimitiveCompilationUnit(String p0, List<ImportDecl> p1, List<TypeDecl> p2) {
053        setPackageDecl(p0);
054        setChild(p1, 0);
055        setChild(p2, 1);
056      }
057      /**
058       * @declaredat ASTNode:20
059       */
060      public PrimitiveCompilationUnit(beaver.Symbol p0, List<ImportDecl> p1, List<TypeDecl> p2) {
061        setPackageDecl(p0);
062        setChild(p1, 0);
063        setChild(p2, 1);
064      }
065      /**
066       * @apilevel low-level
067       * @declaredat ASTNode:28
068       */
069      protected int numChildren() {
070        return 2;
071      }
072      /**
073       * @apilevel internal
074       * @declaredat ASTNode:34
075       */
076      public boolean mayHaveRewrite() {
077        return false;
078      }
079      /**
080       * @apilevel internal
081       * @declaredat ASTNode:40
082       */
083      public void flushAttrCache() {
084        super.flushAttrCache();
085        typeBoolean_reset();
086        typeByte_reset();
087        typeShort_reset();
088        typeChar_reset();
089        typeInt_reset();
090        typeLong_reset();
091        typeFloat_reset();
092        typeDouble_reset();
093        typeVoid_reset();
094        typeNull_reset();
095        unknownType_reset();
096      }
097      /**
098       * @apilevel internal
099       * @declaredat ASTNode:57
100       */
101      public void flushCollectionCache() {
102        super.flushCollectionCache();
103      }
104      /**
105       * @apilevel internal
106       * @declaredat ASTNode:63
107       */
108      public void flushRewriteCache() {
109        super.flushRewriteCache();
110      }
111      /**
112       * @apilevel internal
113       * @declaredat ASTNode:69
114       */
115      public PrimitiveCompilationUnit clone() throws CloneNotSupportedException {
116        PrimitiveCompilationUnit node = (PrimitiveCompilationUnit) super.clone();
117        return node;
118      }
119      /**
120       * @apilevel internal
121       * @declaredat ASTNode:76
122       */
123      public PrimitiveCompilationUnit copy() {
124        try {
125          PrimitiveCompilationUnit node = (PrimitiveCompilationUnit) clone();
126          node.parent = null;
127          if (children != null) {
128            node.children = (ASTNode[]) children.clone();
129          }
130          return node;
131        } catch (CloneNotSupportedException e) {
132          throw new Error("Error: clone not supported for " + getClass().getName());
133        }
134      }
135      /**
136       * Create a deep copy of the AST subtree at this node.
137       * The copy is dangling, i.e. has no parent.
138       * @return dangling copy of the subtree at this node
139       * @apilevel low-level
140       * @deprecated Please use treeCopy or treeCopyNoTransform instead
141       * @declaredat ASTNode:95
142       */
143      @Deprecated
144      public PrimitiveCompilationUnit fullCopy() {
145        return treeCopyNoTransform();
146      }
147      /**
148       * Create a deep copy of the AST subtree at this node.
149       * The copy is dangling, i.e. has no parent.
150       * @return dangling copy of the subtree at this node
151       * @apilevel low-level
152       * @declaredat ASTNode:105
153       */
154      public PrimitiveCompilationUnit treeCopyNoTransform() {
155        PrimitiveCompilationUnit tree = (PrimitiveCompilationUnit) copy();
156        if (children != null) {
157          for (int i = 0; i < children.length; ++i) {
158            ASTNode child = (ASTNode) children[i];
159            if (child != null) {
160              child = child.treeCopyNoTransform();
161              tree.setChild(child, i);
162            }
163          }
164        }
165        return tree;
166      }
167      /**
168       * Create a deep copy of the AST subtree at this node.
169       * The subtree of this node is traversed to trigger rewrites before copy.
170       * The copy is dangling, i.e. has no parent.
171       * @return dangling copy of the subtree at this node
172       * @apilevel low-level
173       * @declaredat ASTNode:125
174       */
175      public PrimitiveCompilationUnit treeCopy() {
176        doFullTraversal();
177        return treeCopyNoTransform();
178      }
179      /**
180       * @apilevel internal
181       * @declaredat ASTNode:132
182       */
183      protected boolean is$Equal(ASTNode node) {
184        return super.is$Equal(node) && (tokenString_PackageDecl == ((PrimitiveCompilationUnit)node).tokenString_PackageDecl);    
185      }
186      /**
187       * Replaces the lexeme PackageDecl.
188       * @param value The new value for the lexeme PackageDecl.
189       * @apilevel high-level
190       */
191      public void setPackageDecl(String value) {
192        tokenString_PackageDecl = value;
193      }
194      /**
195       * JastAdd-internal setter for lexeme PackageDecl using the Beaver parser.
196       * @param symbol Symbol containing the new value for the lexeme PackageDecl
197       * @apilevel internal
198       */
199      public void setPackageDecl(beaver.Symbol symbol) {
200        if (symbol.value != null && !(symbol.value instanceof String))
201        throw new UnsupportedOperationException("setPackageDecl is only valid for String lexemes");
202        tokenString_PackageDecl = (String)symbol.value;
203        PackageDeclstart = symbol.getStart();
204        PackageDeclend = symbol.getEnd();
205      }
206      /**
207       * Retrieves the value for the lexeme PackageDecl.
208       * @return The value for the lexeme PackageDecl.
209       * @apilevel high-level
210       */
211      @ASTNodeAnnotation.Token(name="PackageDecl")
212      public String getPackageDecl() {
213        return tokenString_PackageDecl != null ? tokenString_PackageDecl : "";
214      }
215      /**
216       * Replaces the ImportDecl list.
217       * @param list The new list node to be used as the ImportDecl list.
218       * @apilevel high-level
219       */
220      public void setImportDeclList(List<ImportDecl> list) {
221        setChild(list, 0);
222      }
223      /**
224       * Retrieves the number of children in the ImportDecl list.
225       * @return Number of children in the ImportDecl list.
226       * @apilevel high-level
227       */
228      public int getNumImportDecl() {
229        return getImportDeclList().getNumChild();
230      }
231      /**
232       * Retrieves the number of children in the ImportDecl list.
233       * Calling this method will not trigger rewrites.
234       * @return Number of children in the ImportDecl list.
235       * @apilevel low-level
236       */
237      public int getNumImportDeclNoTransform() {
238        return getImportDeclListNoTransform().getNumChildNoTransform();
239      }
240      /**
241       * Retrieves the element at index {@code i} in the ImportDecl list.
242       * @param i Index of the element to return.
243       * @return The element at position {@code i} in the ImportDecl list.
244       * @apilevel high-level
245       */
246      public ImportDecl getImportDecl(int i) {
247        return (ImportDecl) getImportDeclList().getChild(i);
248      }
249      /**
250       * Check whether the ImportDecl list has any children.
251       * @return {@code true} if it has at least one child, {@code false} otherwise.
252       * @apilevel high-level
253       */
254      public boolean hasImportDecl() {
255        return getImportDeclList().getNumChild() != 0;
256      }
257      /**
258       * Append an element to the ImportDecl list.
259       * @param node The element to append to the ImportDecl list.
260       * @apilevel high-level
261       */
262      public void addImportDecl(ImportDecl node) {
263        List<ImportDecl> list = (parent == null) ? getImportDeclListNoTransform() : getImportDeclList();
264        list.addChild(node);
265      }
266      /**
267       * @apilevel low-level
268       */
269      public void addImportDeclNoTransform(ImportDecl node) {
270        List<ImportDecl> list = getImportDeclListNoTransform();
271        list.addChild(node);
272      }
273      /**
274       * Replaces the ImportDecl list element at index {@code i} with the new node {@code node}.
275       * @param node The new node to replace the old list element.
276       * @param i The list index of the node to be replaced.
277       * @apilevel high-level
278       */
279      public void setImportDecl(ImportDecl node, int i) {
280        List<ImportDecl> list = getImportDeclList();
281        list.setChild(node, i);
282      }
283      /**
284       * Retrieves the ImportDecl list.
285       * @return The node representing the ImportDecl list.
286       * @apilevel high-level
287       */
288      @ASTNodeAnnotation.ListChild(name="ImportDecl")
289      public List<ImportDecl> getImportDeclList() {
290        List<ImportDecl> list = (List<ImportDecl>) getChild(0);
291        return list;
292      }
293      /**
294       * Retrieves the ImportDecl list.
295       * <p><em>This method does not invoke AST transformations.</em></p>
296       * @return The node representing the ImportDecl list.
297       * @apilevel low-level
298       */
299      public List<ImportDecl> getImportDeclListNoTransform() {
300        return (List<ImportDecl>) getChildNoTransform(0);
301      }
302      /**
303       * Retrieves the ImportDecl list.
304       * @return The node representing the ImportDecl list.
305       * @apilevel high-level
306       */
307      public List<ImportDecl> getImportDecls() {
308        return getImportDeclList();
309      }
310      /**
311       * Retrieves the ImportDecl list.
312       * <p><em>This method does not invoke AST transformations.</em></p>
313       * @return The node representing the ImportDecl list.
314       * @apilevel low-level
315       */
316      public List<ImportDecl> getImportDeclsNoTransform() {
317        return getImportDeclListNoTransform();
318      }
319      /**
320       * Replaces the TypeDecl list.
321       * @param list The new list node to be used as the TypeDecl list.
322       * @apilevel high-level
323       */
324      public void setTypeDeclList(List<TypeDecl> list) {
325        setChild(list, 1);
326      }
327      /**
328       * Retrieves the number of children in the TypeDecl list.
329       * @return Number of children in the TypeDecl list.
330       * @apilevel high-level
331       */
332      public int getNumTypeDecl() {
333        return getTypeDeclList().getNumChild();
334      }
335      /**
336       * Retrieves the number of children in the TypeDecl list.
337       * Calling this method will not trigger rewrites.
338       * @return Number of children in the TypeDecl list.
339       * @apilevel low-level
340       */
341      public int getNumTypeDeclNoTransform() {
342        return getTypeDeclListNoTransform().getNumChildNoTransform();
343      }
344      /**
345       * Retrieves the element at index {@code i} in the TypeDecl list.
346       * @param i Index of the element to return.
347       * @return The element at position {@code i} in the TypeDecl list.
348       * @apilevel high-level
349       */
350      public TypeDecl getTypeDecl(int i) {
351        return (TypeDecl) getTypeDeclList().getChild(i);
352      }
353      /**
354       * Check whether the TypeDecl list has any children.
355       * @return {@code true} if it has at least one child, {@code false} otherwise.
356       * @apilevel high-level
357       */
358      public boolean hasTypeDecl() {
359        return getTypeDeclList().getNumChild() != 0;
360      }
361      /**
362       * Append an element to the TypeDecl list.
363       * @param node The element to append to the TypeDecl list.
364       * @apilevel high-level
365       */
366      public void addTypeDecl(TypeDecl node) {
367        List<TypeDecl> list = (parent == null) ? getTypeDeclListNoTransform() : getTypeDeclList();
368        list.addChild(node);
369      }
370      /**
371       * @apilevel low-level
372       */
373      public void addTypeDeclNoTransform(TypeDecl node) {
374        List<TypeDecl> list = getTypeDeclListNoTransform();
375        list.addChild(node);
376      }
377      /**
378       * Replaces the TypeDecl list element at index {@code i} with the new node {@code node}.
379       * @param node The new node to replace the old list element.
380       * @param i The list index of the node to be replaced.
381       * @apilevel high-level
382       */
383      public void setTypeDecl(TypeDecl node, int i) {
384        List<TypeDecl> list = getTypeDeclList();
385        list.setChild(node, i);
386      }
387      /**
388       * Retrieves the TypeDecl list.
389       * @return The node representing the TypeDecl list.
390       * @apilevel high-level
391       */
392      @ASTNodeAnnotation.ListChild(name="TypeDecl")
393      public List<TypeDecl> getTypeDeclList() {
394        List<TypeDecl> list = (List<TypeDecl>) getChild(1);
395        return list;
396      }
397      /**
398       * Retrieves the TypeDecl list.
399       * <p><em>This method does not invoke AST transformations.</em></p>
400       * @return The node representing the TypeDecl list.
401       * @apilevel low-level
402       */
403      public List<TypeDecl> getTypeDeclListNoTransform() {
404        return (List<TypeDecl>) getChildNoTransform(1);
405      }
406      /**
407       * Retrieves the TypeDecl list.
408       * @return The node representing the TypeDecl list.
409       * @apilevel high-level
410       */
411      public List<TypeDecl> getTypeDecls() {
412        return getTypeDeclList();
413      }
414      /**
415       * Retrieves the TypeDecl list.
416       * <p><em>This method does not invoke AST transformations.</em></p>
417       * @return The node representing the TypeDecl list.
418       * @apilevel low-level
419       */
420      public List<TypeDecl> getTypeDeclsNoTransform() {
421        return getTypeDeclListNoTransform();
422      }
423      /**
424       * @apilevel internal
425       */
426      protected boolean typeBoolean_computed = false;
427      /**
428       * @apilevel internal
429       */
430      protected TypeDecl typeBoolean_value;
431      /**
432       * @apilevel internal
433       */
434      private void typeBoolean_reset() {
435        typeBoolean_computed = false;
436        typeBoolean_value = null;
437      }
438      /**
439       * @attribute syn
440       * @aspect PrimitiveTypes
441       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:34
442       */
443      @ASTNodeAnnotation.Attribute
444      public TypeDecl typeBoolean() {
445        ASTNode$State state = state();
446        if (typeBoolean_computed) {
447          return typeBoolean_value;
448        }
449        boolean intermediate = state.INTERMEDIATE_VALUE;
450        state.INTERMEDIATE_VALUE = false;
451        int num = state.boundariesCrossed;
452        boolean isFinal = this.is$Final();
453        typeBoolean_value = typeBoolean_compute();
454        typeBoolean_value.setParent(this);
455        typeBoolean_value.is$Final = true;
456        if (true) {
457          typeBoolean_computed = true;
458        } else {
459        }
460        state.INTERMEDIATE_VALUE |= intermediate;
461    
462        return typeBoolean_value;
463      }
464      /**
465       * @apilevel internal
466       */
467      private TypeDecl typeBoolean_compute() {
468          BooleanType type = new BooleanType();
469          type.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
470          type.setID("boolean");
471          type.setSuperClass(unknownType().createQualifiedAccess());
472          return type;
473        }
474      /**
475       * @apilevel internal
476       */
477      protected boolean typeByte_computed = false;
478      /**
479       * @apilevel internal
480       */
481      protected TypeDecl typeByte_value;
482      /**
483       * @apilevel internal
484       */
485      private void typeByte_reset() {
486        typeByte_computed = false;
487        typeByte_value = null;
488      }
489      /**
490       * @attribute syn
491       * @aspect PrimitiveTypes
492       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:41
493       */
494      @ASTNodeAnnotation.Attribute
495      public TypeDecl typeByte() {
496        ASTNode$State state = state();
497        if (typeByte_computed) {
498          return typeByte_value;
499        }
500        boolean intermediate = state.INTERMEDIATE_VALUE;
501        state.INTERMEDIATE_VALUE = false;
502        int num = state.boundariesCrossed;
503        boolean isFinal = this.is$Final();
504        typeByte_value = typeByte_compute();
505        typeByte_value.setParent(this);
506        typeByte_value.is$Final = true;
507        if (true) {
508          typeByte_computed = true;
509        } else {
510        }
511        state.INTERMEDIATE_VALUE |= intermediate;
512    
513        return typeByte_value;
514      }
515      /**
516       * @apilevel internal
517       */
518      private TypeDecl typeByte_compute() {
519          ByteType type = new ByteType();
520          type.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
521          type.setID("byte");
522          type.setSuperClass(typeShort().createQualifiedAccess());
523          return type;
524        }
525      /**
526       * @apilevel internal
527       */
528      protected boolean typeShort_computed = false;
529      /**
530       * @apilevel internal
531       */
532      protected TypeDecl typeShort_value;
533      /**
534       * @apilevel internal
535       */
536      private void typeShort_reset() {
537        typeShort_computed = false;
538        typeShort_value = null;
539      }
540      /**
541       * @attribute syn
542       * @aspect PrimitiveTypes
543       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:48
544       */
545      @ASTNodeAnnotation.Attribute
546      public TypeDecl typeShort() {
547        ASTNode$State state = state();
548        if (typeShort_computed) {
549          return typeShort_value;
550        }
551        boolean intermediate = state.INTERMEDIATE_VALUE;
552        state.INTERMEDIATE_VALUE = false;
553        int num = state.boundariesCrossed;
554        boolean isFinal = this.is$Final();
555        typeShort_value = typeShort_compute();
556        typeShort_value.setParent(this);
557        typeShort_value.is$Final = true;
558        if (true) {
559          typeShort_computed = true;
560        } else {
561        }
562        state.INTERMEDIATE_VALUE |= intermediate;
563    
564        return typeShort_value;
565      }
566      /**
567       * @apilevel internal
568       */
569      private TypeDecl typeShort_compute() {
570          ShortType type = new ShortType();
571          type.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
572          type.setID("short");
573          type.setSuperClass(typeInt().createQualifiedAccess());
574          return type;
575        }
576      /**
577       * @apilevel internal
578       */
579      protected boolean typeChar_computed = false;
580      /**
581       * @apilevel internal
582       */
583      protected TypeDecl typeChar_value;
584      /**
585       * @apilevel internal
586       */
587      private void typeChar_reset() {
588        typeChar_computed = false;
589        typeChar_value = null;
590      }
591      /**
592       * @attribute syn
593       * @aspect PrimitiveTypes
594       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:55
595       */
596      @ASTNodeAnnotation.Attribute
597      public TypeDecl typeChar() {
598        ASTNode$State state = state();
599        if (typeChar_computed) {
600          return typeChar_value;
601        }
602        boolean intermediate = state.INTERMEDIATE_VALUE;
603        state.INTERMEDIATE_VALUE = false;
604        int num = state.boundariesCrossed;
605        boolean isFinal = this.is$Final();
606        typeChar_value = typeChar_compute();
607        typeChar_value.setParent(this);
608        typeChar_value.is$Final = true;
609        if (true) {
610          typeChar_computed = true;
611        } else {
612        }
613        state.INTERMEDIATE_VALUE |= intermediate;
614    
615        return typeChar_value;
616      }
617      /**
618       * @apilevel internal
619       */
620      private TypeDecl typeChar_compute() {
621          CharType type = new CharType();
622          type.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
623          type.setID("char");
624          type.setSuperClass(typeInt().createQualifiedAccess());
625          return type;
626        }
627      /**
628       * @apilevel internal
629       */
630      protected boolean typeInt_computed = false;
631      /**
632       * @apilevel internal
633       */
634      protected TypeDecl typeInt_value;
635      /**
636       * @apilevel internal
637       */
638      private void typeInt_reset() {
639        typeInt_computed = false;
640        typeInt_value = null;
641      }
642      /**
643       * @attribute syn
644       * @aspect PrimitiveTypes
645       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:62
646       */
647      @ASTNodeAnnotation.Attribute
648      public TypeDecl typeInt() {
649        ASTNode$State state = state();
650        if (typeInt_computed) {
651          return typeInt_value;
652        }
653        boolean intermediate = state.INTERMEDIATE_VALUE;
654        state.INTERMEDIATE_VALUE = false;
655        int num = state.boundariesCrossed;
656        boolean isFinal = this.is$Final();
657        typeInt_value = typeInt_compute();
658        typeInt_value.setParent(this);
659        typeInt_value.is$Final = true;
660        if (true) {
661          typeInt_computed = true;
662        } else {
663        }
664        state.INTERMEDIATE_VALUE |= intermediate;
665    
666        return typeInt_value;
667      }
668      /**
669       * @apilevel internal
670       */
671      private TypeDecl typeInt_compute() {
672          IntType type = new IntType();
673          type.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
674          type.setID("int");
675          type.setSuperClass(typeLong().createQualifiedAccess());
676          return type;
677        }
678      /**
679       * @apilevel internal
680       */
681      protected boolean typeLong_computed = false;
682      /**
683       * @apilevel internal
684       */
685      protected TypeDecl typeLong_value;
686      /**
687       * @apilevel internal
688       */
689      private void typeLong_reset() {
690        typeLong_computed = false;
691        typeLong_value = null;
692      }
693      /**
694       * @attribute syn
695       * @aspect PrimitiveTypes
696       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:69
697       */
698      @ASTNodeAnnotation.Attribute
699      public TypeDecl typeLong() {
700        ASTNode$State state = state();
701        if (typeLong_computed) {
702          return typeLong_value;
703        }
704        boolean intermediate = state.INTERMEDIATE_VALUE;
705        state.INTERMEDIATE_VALUE = false;
706        int num = state.boundariesCrossed;
707        boolean isFinal = this.is$Final();
708        typeLong_value = typeLong_compute();
709        typeLong_value.setParent(this);
710        typeLong_value.is$Final = true;
711        if (true) {
712          typeLong_computed = true;
713        } else {
714        }
715        state.INTERMEDIATE_VALUE |= intermediate;
716    
717        return typeLong_value;
718      }
719      /**
720       * @apilevel internal
721       */
722      private TypeDecl typeLong_compute() {
723          LongType type = new LongType();
724          type.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
725          type.setID("long");
726          // Float doesn't seem right here, keeping it because the old code does this
727          type.setSuperClass(typeFloat().createQualifiedAccess());
728          return type;
729        }
730      /**
731       * @apilevel internal
732       */
733      protected boolean typeFloat_computed = false;
734      /**
735       * @apilevel internal
736       */
737      protected TypeDecl typeFloat_value;
738      /**
739       * @apilevel internal
740       */
741      private void typeFloat_reset() {
742        typeFloat_computed = false;
743        typeFloat_value = null;
744      }
745      /**
746       * @attribute syn
747       * @aspect PrimitiveTypes
748       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:77
749       */
750      @ASTNodeAnnotation.Attribute
751      public TypeDecl typeFloat() {
752        ASTNode$State state = state();
753        if (typeFloat_computed) {
754          return typeFloat_value;
755        }
756        boolean intermediate = state.INTERMEDIATE_VALUE;
757        state.INTERMEDIATE_VALUE = false;
758        int num = state.boundariesCrossed;
759        boolean isFinal = this.is$Final();
760        typeFloat_value = typeFloat_compute();
761        typeFloat_value.setParent(this);
762        typeFloat_value.is$Final = true;
763        if (true) {
764          typeFloat_computed = true;
765        } else {
766        }
767        state.INTERMEDIATE_VALUE |= intermediate;
768    
769        return typeFloat_value;
770      }
771      /**
772       * @apilevel internal
773       */
774      private TypeDecl typeFloat_compute() {
775          FloatType type = new FloatType();
776          type.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
777          type.setID("float");
778          type.setSuperClass(typeDouble().createQualifiedAccess());
779          return type;
780        }
781      /**
782       * @apilevel internal
783       */
784      protected boolean typeDouble_computed = false;
785      /**
786       * @apilevel internal
787       */
788      protected TypeDecl typeDouble_value;
789      /**
790       * @apilevel internal
791       */
792      private void typeDouble_reset() {
793        typeDouble_computed = false;
794        typeDouble_value = null;
795      }
796      /**
797       * @attribute syn
798       * @aspect PrimitiveTypes
799       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:84
800       */
801      @ASTNodeAnnotation.Attribute
802      public TypeDecl typeDouble() {
803        ASTNode$State state = state();
804        if (typeDouble_computed) {
805          return typeDouble_value;
806        }
807        boolean intermediate = state.INTERMEDIATE_VALUE;
808        state.INTERMEDIATE_VALUE = false;
809        int num = state.boundariesCrossed;
810        boolean isFinal = this.is$Final();
811        typeDouble_value = typeDouble_compute();
812        typeDouble_value.setParent(this);
813        typeDouble_value.is$Final = true;
814        if (true) {
815          typeDouble_computed = true;
816        } else {
817        }
818        state.INTERMEDIATE_VALUE |= intermediate;
819    
820        return typeDouble_value;
821      }
822      /**
823       * @apilevel internal
824       */
825      private TypeDecl typeDouble_compute() {
826          DoubleType type = new DoubleType();
827          type.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
828          type.setID("double");
829          type.setSuperClass(unknownType().createQualifiedAccess());
830          return type;
831        }
832      /**
833       * @apilevel internal
834       */
835      protected boolean typeVoid_computed = false;
836      /**
837       * @apilevel internal
838       */
839      protected TypeDecl typeVoid_value;
840      /**
841       * @apilevel internal
842       */
843      private void typeVoid_reset() {
844        typeVoid_computed = false;
845        typeVoid_value = null;
846      }
847      /**
848       * @attribute syn
849       * @aspect PrimitiveTypes
850       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:91
851       */
852      @ASTNodeAnnotation.Attribute
853      public TypeDecl typeVoid() {
854        ASTNode$State state = state();
855        if (typeVoid_computed) {
856          return typeVoid_value;
857        }
858        boolean intermediate = state.INTERMEDIATE_VALUE;
859        state.INTERMEDIATE_VALUE = false;
860        int num = state.boundariesCrossed;
861        boolean isFinal = this.is$Final();
862        typeVoid_value = typeVoid_compute();
863        typeVoid_value.setParent(this);
864        typeVoid_value.is$Final = true;
865        if (true) {
866          typeVoid_computed = true;
867        } else {
868        }
869        state.INTERMEDIATE_VALUE |= intermediate;
870    
871        return typeVoid_value;
872      }
873      /**
874       * @apilevel internal
875       */
876      private TypeDecl typeVoid_compute() {
877          VoidType classDecl = new VoidType();
878          classDecl.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
879          classDecl.setID("void");
880          return classDecl;
881        }
882      /**
883       * @apilevel internal
884       */
885      protected boolean typeNull_computed = false;
886      /**
887       * @apilevel internal
888       */
889      protected TypeDecl typeNull_value;
890      /**
891       * @apilevel internal
892       */
893      private void typeNull_reset() {
894        typeNull_computed = false;
895        typeNull_value = null;
896      }
897      /**
898       * @attribute syn
899       * @aspect PrimitiveTypes
900       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:97
901       */
902      @ASTNodeAnnotation.Attribute
903      public TypeDecl typeNull() {
904        ASTNode$State state = state();
905        if (typeNull_computed) {
906          return typeNull_value;
907        }
908        boolean intermediate = state.INTERMEDIATE_VALUE;
909        state.INTERMEDIATE_VALUE = false;
910        int num = state.boundariesCrossed;
911        boolean isFinal = this.is$Final();
912        typeNull_value = typeNull_compute();
913        typeNull_value.setParent(this);
914        typeNull_value.is$Final = true;
915        if (true) {
916          typeNull_computed = true;
917        } else {
918        }
919        state.INTERMEDIATE_VALUE |= intermediate;
920    
921        return typeNull_value;
922      }
923      /**
924       * @apilevel internal
925       */
926      private TypeDecl typeNull_compute() {
927          NullType classDecl = new NullType();
928          classDecl.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
929          classDecl.setID("null");
930          return classDecl;
931        }
932      /**
933       * @apilevel internal
934       */
935      protected boolean unknownType_computed = false;
936      /**
937       * @apilevel internal
938       */
939      protected TypeDecl unknownType_value;
940      /**
941       * @apilevel internal
942       */
943      private void unknownType_reset() {
944        unknownType_computed = false;
945        unknownType_value = null;
946      }
947      /**
948       * @attribute syn
949       * @aspect PrimitiveTypes
950       * @declaredat /home/jesper/git/extendj/java4/frontend/PrimitiveTypes.jrag:103
951       */
952      @ASTNodeAnnotation.Attribute
953      public TypeDecl unknownType() {
954        ASTNode$State state = state();
955        if (unknownType_computed) {
956          return unknownType_value;
957        }
958        boolean intermediate = state.INTERMEDIATE_VALUE;
959        state.INTERMEDIATE_VALUE = false;
960        int num = state.boundariesCrossed;
961        boolean isFinal = this.is$Final();
962        unknownType_value = unknownType_compute();
963        unknownType_value.setParent(this);
964        unknownType_value.is$Final = true;
965        if (true) {
966          unknownType_computed = true;
967        } else {
968        }
969        state.INTERMEDIATE_VALUE |= intermediate;
970    
971        return unknownType_value;
972      }
973      /**
974       * @apilevel internal
975       */
976      private TypeDecl unknownType_compute() {
977          ClassDecl classDecl = new UnknownType();
978          classDecl.setModifiers(new Modifiers(new List().add(new Modifier("public"))));
979          classDecl.setID("Unknown");
980          MethodDecl methodDecl = new MethodDecl(
981              new Modifiers(new List().add(
982                new Modifier("public")
983              )),
984              new PrimitiveTypeAccess("Unknown"),
985              "unknown",
986              new List(),
987              new List(),
988              new Opt()
989          );
990          classDecl.addBodyDecl(methodDecl);
991          FieldDeclaration fieldDecl = new FieldDeclaration(
992              new Modifiers(new List().add(
993                new Modifier("public")
994              )),
995              new PrimitiveTypeAccess("Unknown"),
996              "unknown",
997              new Opt()
998          );
999          classDecl.addBodyDecl(fieldDecl);
1000          ConstructorDecl constrDecl = new ConstructorDecl(
1001            new Modifiers(new List().add(new Modifier("public"))),
1002            "Unknown",
1003            new List(),
1004            new List(),
1005            new Opt(),
1006            new Block()
1007          );
1008          classDecl.addBodyDecl(constrDecl);
1009          return classDecl;
1010        }
1011      /**
1012       * @apilevel internal
1013       */
1014      public ASTNode rewriteTo() {
1015        return super.rewriteTo();
1016      }
1017    }