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:101
027     * @production Expr : {@link ASTNode};
028    
029     */
030    public abstract class Expr extends ASTNode<ASTNode> implements Cloneable {
031      /**
032       * @aspect TypeScopePropagation
033       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:580
034       */
035      public SimpleSet keepAccessibleTypes(SimpleSet oldSet) {
036        SimpleSet newSet = SimpleSet.emptySet;
037        TypeDecl hostType = hostType();
038        for (Iterator iter = oldSet.iterator(); iter.hasNext(); ) {
039          TypeDecl t = (TypeDecl) iter.next();
040          if ((hostType != null && t.accessibleFrom(hostType))
041              || (hostType == null && t.accessibleFromPackage(hostPackage()))) {
042            newSet = newSet.add(t);
043          }
044        }
045        return newSet;
046      }
047      /**
048       * Remove fields that are not accessible when using this Expr as qualifier
049       * @return a set containing the accessible fields
050       * @aspect VariableScope
051       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:260
052       */
053      public SimpleSet keepAccessibleFields(SimpleSet oldSet) {
054        SimpleSet newSet = SimpleSet.emptySet;
055        for (Iterator iter = oldSet.iterator(); iter.hasNext(); ) {
056          Variable v = (Variable) iter.next();
057          if (v instanceof FieldDeclaration) {
058            FieldDeclaration f = (FieldDeclaration) v;
059            if (mayAccess(f)) {
060              newSet = newSet.add(f);
061            }
062          }
063        }
064        return newSet;
065      }
066      /**
067       * @see "JLS $6.6.2.1"
068       * @return true if the expression may access the given field
069       * @aspect VariableScope
070       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:289
071       */
072      public boolean mayAccess(FieldDeclaration f) {
073        if (f.isPublic()) {
074          return true;
075        } else if (f.isProtected()) {
076          if (f.hostPackage().equals(hostPackage())) {
077            return true;
078          }
079          return hostType().mayAccess(this, f);
080        } else if (f.isPrivate()) {
081          return f.hostType().topLevelType() == hostType().topLevelType();
082        } else {
083          return f.hostPackage().equals(hostType().hostPackage());
084        }
085      }
086      /**
087       * Creates a qualified expression. This will not be subject to rewriting.
088       * @aspect QualifiedNames
089       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:136
090       */
091      public Dot qualifiesAccess(Access access) {
092        Dot dot = new Dot(this, access);
093        dot.setStart(this.getStart());
094        dot.setEnd(access.getEnd());
095        return dot;
096      }
097      /**
098       * @aspect CodeGeneration
099       * @declaredat /home/jesper/git/extendj/java4/backend/CodeGeneration.jrag:353
100       */
101      public void emitStore(CodeGeneration gen) { error("emitStore called with " + getClass().getName()); }
102      /**
103       * @aspect CodeGenerationBinaryOperations
104       * @declaredat /home/jesper/git/extendj/java4/backend/CodeGeneration.jrag:654
105       */
106      void emitOperation(CodeGeneration gen) {error();}
107      /**
108       * @aspect CreateBCode
109       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:242
110       */
111      protected boolean needsPush() {
112        ASTNode n = getParent();
113        while (n instanceof ParExpr) {
114          n = n.getParent();
115        }
116        return !(n instanceof ExprStmt);
117      }
118      /**
119       * @aspect CreateBCode
120       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:428
121       */
122      public void createAssignSimpleLoadDest(CodeGeneration gen) {
123      }
124      /**
125       * duplicate top value on stack and store below destination element
126       * @aspect CreateBCode
127       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:444
128       */
129      public void createPushAssignmentResult(CodeGeneration gen) {
130      }
131      /**
132       * @aspect CreateBCode
133       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:464
134       */
135      public void createAssignLoadDest(CodeGeneration gen) {
136      }
137      /**
138       * @aspect CreateBCode
139       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1050
140       */
141      protected void emitBooleanCondition(CodeGeneration gen) {
142        int end_label = -1;
143        int false_label = -1;
144        if (!isConstant()) {
145          false_label = gen.constantPool().newLabel();
146          branchFalse(gen, false_label);
147        }
148        if (canBeTrue()) {
149          BooleanLiteral.push(gen, true);
150          if (canBeFalse()) {
151            end_label = gen.constantPool().newLabel();
152            gen.emitGoto(end_label);
153            gen.changeStackDepth(-1); // discard value from stack depth computation
154          }
155        }
156        if (false_label != -1) {
157          gen.addLabel(false_label);
158        }
159        if (canBeFalse()) {
160          BooleanLiteral.push(gen, false);
161        }
162        if (end_label != -1) {
163          gen.addLabel(end_label);
164        }
165      }
166      /**
167       * Generate a conditional branch statement. The branch should be taken if the
168       * expression evaluates to true. May in some cases not result in an actual
169       * branch statement if the branch would never be taken.
170       * @param gen code generator
171       * @param target target label to jump to if the condition was true
172       * @aspect CreateBCode
173       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1111
174       */
175      public void refined_CreateBCode_Expr_branchTrue(CodeGeneration gen, int target) {
176        // branch when true
177        if (isConstant()) {
178          if (isTrue()) {
179            gen.emitGoto(target);
180            //gen.GOTO(target);
181          } // else { fallthrough }
182        } else {
183          createBCode(gen);
184          gen.emitCompare(Bytecode.IFNE, target);
185          //gen.IFNE(target);// branch if value != 0
186        }
187      }
188      /**
189       * Generate a conditional branch statement. The branch should be taken if the
190       * expression evaluates to false. May in some cases not result in an actual
191       * branch statement if the branch would never be taken.
192       * @param gen code generator
193       * @param target target label to jump to if the condition was false
194       * @aspect CreateBCode
195       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1226
196       */
197      public void refined_CreateBCode_Expr_branchFalse(CodeGeneration gen, int target) {
198        // branch when false
199        if (isConstant()) {
200          if (isFalse()) {
201            gen.emitGoto(target);
202            //gen.GOTO(target);
203          } // else { fallthrough }
204        } else {
205          createBCode(gen);
206          gen.emitCompare(Bytecode.IFEQ, target);
207          //gen.IFEQ(target);// branch if value == 0
208        }
209      }
210      /**
211       * Infer type arguments based on the actual arguments and result assignment type.
212       * @aspect GenericMethodsInference
213       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethodsInference.jrag:73
214       */
215      public Collection<TypeDecl> computeConstraints(
216          TypeDecl resultType,
217          List<ParameterDeclaration> params,
218          List<Expr> args,
219          List<TypeVariable> typeParams) {
220        Constraints c = new Constraints();
221        // Store type parameters.
222        for (int i = 0; i < typeParams.getNumChild(); i++) {
223          c.addTypeVariable(typeParams.getChild(i));
224        }
225    
226        // Add initial constraints.
227        for (int i = 0; i < args.getNumChild(); i++) {
228          TypeDecl A = args.getChild(i).type();
229          int index = i >= params.getNumChild() ? params.getNumChild() - 1 : i;
230          TypeDecl F = params.getChild(index).type();
231          if (params.getChild(index) instanceof VariableArityParameterDeclaration
232             && (args.getNumChild() != params.getNumChild() || !A.isArrayDecl())) {
233            F = F.componentType();
234          }
235          c.convertibleTo(A, F);
236        }
237    
238        if (c.rawAccess) {
239          return new ArrayList<TypeDecl>();
240        }
241    
242        //c.printConstraints();
243        //System.err.println("Resolving equality constraints");
244        c.resolveEqualityConstraints();
245        //c.printConstraints();
246    
247        //System.err.println("Resolving supertype constraints");
248        c.resolveSupertypeConstraints();
249        //c.printConstraints();
250    
251        //System.err.println("Resolving unresolved type arguments");
252        //c.resolveBounds();
253        //c.printConstraints();
254    
255        if (c.unresolvedTypeArguments()) {
256          TypeDecl S = assignConvertedType();
257          if (S.isUnboxedPrimitive()) {
258            S = S.boxed();
259          }
260          TypeDecl R = resultType;
261          // TODO: replace all uses of type variables in R with their inferred types
262          TypeDecl Rprime = R;
263          if (R.isVoid()) {
264            R = typeObject();
265          }
266          c.convertibleFrom(S, R);
267          // TODO: additional constraints
268    
269          c.resolveEqualityConstraints();
270          c.resolveSupertypeConstraints();
271          //c.resolveBounds();
272    
273          c.resolveSubtypeConstraints();
274        }
275    
276        return c.typeArguments();
277      }
278      /**
279       * @aspect MethodSignature15
280       * @declaredat /home/jesper/git/extendj/java5/frontend/MethodSignature.jrag:177
281       */
282      protected static SimpleSet mostSpecific(SimpleSet maxSpecific, ConstructorDecl decl) {
283        if (maxSpecific.isEmpty()) {
284          maxSpecific = maxSpecific.add(decl);
285        } else {
286          ConstructorDecl other = (ConstructorDecl) maxSpecific.iterator().next();
287          if (decl.moreSpecificThan(other)) {
288            maxSpecific = SimpleSet.emptySet.add(decl);
289          } else if (!other.moreSpecificThan(decl)) {
290            maxSpecific = maxSpecific.add(decl);
291          }
292        }
293        return maxSpecific;
294      }
295      /**
296       * @aspect MethodSignature18
297       * @declaredat /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag:992
298       */
299      protected static boolean moreSpecificThan(ConstructorDecl m1, ConstructorDecl m2, List<Expr> argList) {
300        if (m1 instanceof ParConstructorDecl) {
301          return m1.moreSpecificThan(m2);
302        }
303        if (m1.getNumParameter() == 0) {
304          return false;
305        }
306        if (!m1.isVariableArity() && !m2.isVariableArity()) {
307          for (int i = 0; i < m1.getNumParameter(); i++) {
308            Expr arg = argList.getChild(i);
309            if (!arg.moreSpecificThan(m1.getParameter(i).type(), m2.getParameter(i).type())) {
310              return false;
311            }
312          }
313          return true;
314        }
315    
316        int num = argList.getNumChild();
317        for (int i = 0; i < num; i++) {
318          TypeDecl t1 = i < m1.getNumParameter() - 1 ? m1.getParameter(i).type() : m1.getParameter(m1.getNumParameter()-1).type().componentType();
319          TypeDecl t2 = i < m2.getNumParameter() - 1 ? m2.getParameter(i).type() : m2.getParameter(m2.getNumParameter()-1).type().componentType();
320    
321          Expr arg = (Expr) argList.getChild(i);
322          if (!arg.moreSpecificThan(t1, t2)) {
323              return false;
324          }
325        }
326        return true;
327      }
328      /**
329       * @aspect MethodSignature18
330       * @declaredat /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag:1022
331       */
332      protected static SimpleSet mostSpecific(SimpleSet maxSpecific, ConstructorDecl decl, List<Expr> argList) {
333        SimpleSet newMax;
334        if (maxSpecific.isEmpty()) {
335          newMax = maxSpecific.add(decl);
336        } else {
337          boolean foundStricter = false;
338          newMax = SimpleSet.emptySet;
339          Iterator<ConstructorDecl> iter = maxSpecific.iterator();
340          while (iter.hasNext()) {
341            ConstructorDecl toCompare = iter.next();
342            if (!(moreSpecificThan(decl, toCompare, argList) && !moreSpecificThan(toCompare, decl, argList))) {
343              newMax = newMax.add(toCompare);
344            }
345    
346            if (!moreSpecificThan(decl, toCompare, argList) && moreSpecificThan(toCompare, decl, argList)) {
347              foundStricter = true;
348            }
349    
350          }
351    
352          if (!foundStricter) {
353            newMax = newMax.add(decl);
354          }
355        }
356        return newMax;
357      }
358      /**
359       * @declaredat ASTNode:1
360       */
361      public Expr() {
362        super();
363      }
364      /**
365       * Initializes the child array to the correct size.
366       * Initializes List and Opt nta children.
367       * @apilevel internal
368       * @ast method
369       * @declaredat ASTNode:10
370       */
371      public void init$Children() {
372      }
373      /**
374       * @apilevel low-level
375       * @declaredat ASTNode:15
376       */
377      protected int numChildren() {
378        return 0;
379      }
380      /**
381       * @apilevel internal
382       * @declaredat ASTNode:21
383       */
384      public boolean mayHaveRewrite() {
385        return false;
386      }
387      /**
388       * @apilevel internal
389       * @declaredat ASTNode:27
390       */
391      public void flushAttrCache() {
392        super.flushAttrCache();
393        inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__reset();
394        stmtCompatible_reset();
395        compatibleStrictContext_TypeDecl_reset();
396        compatibleLooseContext_TypeDecl_reset();
397        pertinentToApplicability_Expr_BodyDecl_int_reset();
398        moreSpecificThan_TypeDecl_TypeDecl_reset();
399        potentiallyCompatible_TypeDecl_BodyDecl_reset();
400        isBooleanExpression_reset();
401        isNumericExpression_reset();
402        isPolyExpression_reset();
403        assignConversionTo_TypeDecl_reset();
404        nameType_reset();
405        targetType_reset();
406        assignmentContext_reset();
407        invocationContext_reset();
408        castContext_reset();
409        stringContext_reset();
410        numericContext_reset();
411      }
412      /**
413       * @apilevel internal
414       * @declaredat ASTNode:51
415       */
416      public void flushCollectionCache() {
417        super.flushCollectionCache();
418      }
419      /**
420       * @apilevel internal
421       * @declaredat ASTNode:57
422       */
423      public void flushRewriteCache() {
424        super.flushRewriteCache();
425      }
426      /**
427       * @apilevel internal
428       * @declaredat ASTNode:63
429       */
430      public Expr clone() throws CloneNotSupportedException {
431        Expr node = (Expr) super.clone();
432        return node;
433      }
434      /**
435       * Create a deep copy of the AST subtree at this node.
436       * The copy is dangling, i.e. has no parent.
437       * @return dangling copy of the subtree at this node
438       * @apilevel low-level
439       * @deprecated Please use treeCopy or treeCopyNoTransform instead
440       * @declaredat ASTNode:74
441       */
442      @Deprecated
443      public abstract Expr fullCopy();
444      /**
445       * Create a deep copy of the AST subtree at this node.
446       * The copy is dangling, i.e. has no parent.
447       * @return dangling copy of the subtree at this node
448       * @apilevel low-level
449       * @declaredat ASTNode:82
450       */
451      public abstract Expr treeCopyNoTransform();
452      /**
453       * Create a deep copy of the AST subtree at this node.
454       * The subtree of this node is traversed to trigger rewrites before copy.
455       * The copy is dangling, i.e. has no parent.
456       * @return dangling copy of the subtree at this node
457       * @apilevel low-level
458       * @declaredat ASTNode:90
459       */
460      public abstract Expr treeCopy();
461      /**
462       * Generate unboxing code for conditions
463       * 14.9 If, 14.12 While, 14.13 Do, 14.14 For
464       * 
465       * branchTrue is used to emit the condition from these constructs
466       * refine behavior to include unboxing of the value when needed
467       * @aspect AutoBoxingCodegen
468       * @declaredat /home/jesper/git/extendj/java5/backend/AutoBoxingCodegen.jrag:149
469       */
470        public void branchTrue(CodeGeneration gen, int target) {
471        // branch when true
472        if (type().isReferenceType()) {
473          createBCode(gen);
474          type().emitUnboxingOperation(gen);
475          gen.emitCompare(Bytecode.IFNE, target);
476          //gen.IFNE(target);
477        } else {
478          refined_CreateBCode_Expr_branchTrue(gen, target);
479        }
480      }
481      /**
482       * @aspect AutoBoxingCodegen
483       * @declaredat /home/jesper/git/extendj/java5/backend/AutoBoxingCodegen.jrag:161
484       */
485        public void branchFalse(CodeGeneration gen, int target) {
486        // branch when false
487        if (type().isReferenceType()) {
488          createBCode(gen);
489          type().emitUnboxingOperation(gen);
490          gen.emitCompare(Bytecode.IFEQ, target);
491          //gen.IFEQ(target);
492        } else {
493          refined_CreateBCode_Expr_branchFalse(gen, target);
494        }
495      }
496      /**
497       * @aspect MethodSignature18
498       * @declaredat /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag:842
499       */
500       
501      protected SimpleSet chooseConstructor(Collection constructors, List<Expr> argList) {
502        SimpleSet potentiallyApplicable = SimpleSet.emptySet;
503    
504        // Select potentially applicable constructors.
505        for (Iterator iter = constructors.iterator(); iter.hasNext(); ) {
506          ConstructorDecl decl = (ConstructorDecl) iter.next();
507          if (decl.potentiallyApplicable(argList) && decl.accessibleFrom(hostType())) {
508            if (decl.isGeneric()) {
509              GenericConstructorDecl gc = decl.genericDecl();
510              decl = gc.lookupParConstructorDecl(
511                  inferTypeArguments(
512                      gc.type(),
513                      gc.getParameterList(),
514                      argList,
515                      gc.getTypeParameterList()));
516            }
517            potentiallyApplicable = potentiallyApplicable.add(decl);
518          }
519        }
520    
521        // First phase.
522        SimpleSet maxSpecific = SimpleSet.emptySet;
523        for (Iterator iter = potentiallyApplicable.iterator(); iter.hasNext(); ) {
524          ConstructorDecl decl = (ConstructorDecl) iter.next();
525          if (decl.applicableByStrictInvocation(this, argList)) {
526            maxSpecific = mostSpecific(maxSpecific, decl, argList);
527          }
528        }
529    
530        // Second phase.
531        if (maxSpecific.isEmpty()) {
532          for (Iterator iter = potentiallyApplicable.iterator(); iter.hasNext(); ) {
533            ConstructorDecl decl = (ConstructorDecl) iter.next();
534            if (decl.applicableByLooseInvocation(this, argList)) {
535              maxSpecific = mostSpecific(maxSpecific, decl, argList);
536            }
537          }
538        }
539    
540        // Third phase.
541        if (maxSpecific.isEmpty()) {
542          for (Iterator iter = potentiallyApplicable.iterator(); iter.hasNext(); ) {
543            ConstructorDecl decl = (ConstructorDecl) iter.next();
544            if (decl.isVariableArity() && decl.applicableByVariableArityInvocation(this, argList)) {
545              maxSpecific = mostSpecific(maxSpecific, decl, argList);
546            }
547          }
548        }
549        return maxSpecific;
550      }
551      /**
552       * @attribute syn
553       * @aspect TypeAnalysis
554       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:302
555       */
556      @ASTNodeAnnotation.Attribute
557      public abstract TypeDecl type();
558      /**
559       * @attribute syn
560       * @aspect ConstantExpression
561       * @declaredat /home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag:32
562       */
563      @ASTNodeAnnotation.Attribute
564      public Constant constant() {
565        {
566            throw new UnsupportedOperationException("ConstantExpression operation constant"
567                + " not supported for type " + getClass().getName());
568          }
569      }
570      /**
571       * @attribute syn
572       * @aspect ConstantExpression
573       * @declaredat /home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag:220
574       */
575      @ASTNodeAnnotation.Attribute
576      public boolean representableIn(TypeDecl t) {
577        {
578            if (!type().isByte() && !type().isChar() && !type().isShort() && !type().isInt()) {
579              return false;
580            }
581            if (t.isByte()) {
582              return constant().intValue() >= Byte.MIN_VALUE && constant().intValue() <= Byte.MAX_VALUE;
583            }
584            if (t.isChar()) {
585              return constant().intValue() >= Character.MIN_VALUE && constant().intValue() <= Character.MAX_VALUE;
586            }
587            if (t.isShort()) {
588              return constant().intValue() >= Short.MIN_VALUE && constant().intValue() <= Short.MAX_VALUE;
589            }
590            if (t.isInt()) {
591              return constant().intValue() >= Integer.MIN_VALUE && constant().intValue() <= Integer.MAX_VALUE;
592            }
593            return false;
594          }
595      }
596      /**
597       * @attribute syn
598       * @aspect ConstantExpression
599       * @declaredat /home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag:254
600       */
601      @ASTNodeAnnotation.Attribute
602      public boolean isConstant() {
603        boolean isConstant_value = false;
604    
605        return isConstant_value;
606      }
607      /**
608       * @attribute syn
609       * @aspect ConstantExpression
610       * @declaredat /home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag:283
611       */
612      @ASTNodeAnnotation.Attribute
613      public boolean isTrue() {
614        boolean isTrue_value = isConstant() && type() instanceof BooleanType && constant().booleanValue();
615    
616        return isTrue_value;
617      }
618      /**
619       * @attribute syn
620       * @aspect ConstantExpression
621       * @declaredat /home/jesper/git/extendj/java4/frontend/ConstantExpression.jrag:284
622       */
623      @ASTNodeAnnotation.Attribute
624      public boolean isFalse() {
625        boolean isFalse_value = isConstant() && type() instanceof BooleanType && !constant().booleanValue();
626    
627        return isFalse_value;
628      }
629      /**
630       * @attribute syn
631       * @aspect DefiniteAssignment
632       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:81
633       */
634      @ASTNodeAnnotation.Attribute
635      public Variable varDecl() {
636        Variable varDecl_value = null;
637    
638        return varDecl_value;
639      }
640      /**
641       * @attribute syn
642       * @aspect DA
643       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:375
644       */
645      @ASTNodeAnnotation.Attribute
646      public boolean isDAafterFalse(Variable v) {
647        boolean isDAafterFalse_Variable_value = isTrue() || isDAafter(v);
648    
649        return isDAafterFalse_Variable_value;
650      }
651      /**
652       * @attribute syn
653       * @aspect DA
654       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:374
655       */
656      @ASTNodeAnnotation.Attribute
657      public boolean isDAafterTrue(Variable v) {
658        boolean isDAafterTrue_Variable_value = isFalse() || isDAafter(v);
659    
660        return isDAafterTrue_Variable_value;
661      }
662      /**
663       * @attribute syn
664       * @aspect DA
665       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:259
666       */
667      @ASTNodeAnnotation.Attribute
668      public boolean isDAafter(Variable v) {
669        boolean isDAafter_Variable_value = isDAbefore(v);
670    
671        return isDAafter_Variable_value;
672      }
673      /**
674       * @attribute syn
675       * @aspect DU
676       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:792
677       */
678      @ASTNodeAnnotation.Attribute
679      public boolean isDUafterFalse(Variable v) {
680        boolean isDUafterFalse_Variable_value = isTrue() || isDUafter(v);
681    
682        return isDUafterFalse_Variable_value;
683      }
684      /**
685       * @attribute syn
686       * @aspect DU
687       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:791
688       */
689      @ASTNodeAnnotation.Attribute
690      public boolean isDUafterTrue(Variable v) {
691        boolean isDUafterTrue_Variable_value = isFalse() || isDUafter(v);
692    
693        return isDUafterTrue_Variable_value;
694      }
695      /**
696       * @attribute syn
697       * @aspect DU
698       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:783
699       */
700      @ASTNodeAnnotation.Attribute
701      public boolean isDUafter(Variable v) {
702        boolean isDUafter_Variable_value = isDUbefore(v);
703    
704        return isDUafter_Variable_value;
705      }
706      /**
707       * Compute the most specific constructor in a collection.
708       * The constructor is invoked with the arguments specified in argList.
709       * The curent context (this) is used to evaluate the hostType for accessibility.
710       * @attribute syn
711       * @aspect ConstructScope
712       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupConstructor.jrag:55
713       */
714      @ASTNodeAnnotation.Attribute
715      public SimpleSet mostSpecificConstructor(Collection<ConstructorDecl> constructors) {
716        {
717            SimpleSet maxSpecific = SimpleSet.emptySet;
718            for (Iterator iter = constructors.iterator(); iter.hasNext(); ) {
719              ConstructorDecl decl = (ConstructorDecl) iter.next();
720              if (applicableAndAccessible(decl)) {
721                if (maxSpecific.isEmpty()) {
722                  maxSpecific = maxSpecific.add(decl);
723                } else {
724                  ConstructorDecl other = (ConstructorDecl) maxSpecific.iterator().next();
725                  if (decl.moreSpecificThan(other)) {
726                    maxSpecific = SimpleSet.emptySet.add(decl);
727                  } else if (!other.moreSpecificThan(decl)) {
728                    maxSpecific = maxSpecific.add(decl);
729                  }
730                }
731              }
732            }
733            return maxSpecific;
734          }
735      }
736      /**
737       * @attribute syn
738       * @aspect ConstructScope
739       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupConstructor.jrag:75
740       */
741      @ASTNodeAnnotation.Attribute
742      public boolean applicableAndAccessible(ConstructorDecl decl) {
743        boolean applicableAndAccessible_ConstructorDecl_value = false;
744    
745        return applicableAndAccessible_ConstructorDecl_value;
746      }
747      /**
748       * @attribute syn
749       * @aspect LookupFullyQualifiedTypes
750       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:112
751       */
752      @ASTNodeAnnotation.Attribute
753      public boolean hasQualifiedPackage(String packageName) {
754        boolean hasQualifiedPackage_String_value = false;
755    
756        return hasQualifiedPackage_String_value;
757      }
758      /**
759       * @attribute syn
760       * @aspect TypeScopePropagation
761       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:553
762       */
763      @ASTNodeAnnotation.Attribute
764      public SimpleSet qualifiedLookupType(String name) {
765        SimpleSet qualifiedLookupType_String_value = keepAccessibleTypes(type().memberTypes(name));
766    
767        return qualifiedLookupType_String_value;
768      }
769      /**
770       * @attribute syn
771       * @aspect VariableScope
772       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:237
773       */
774      @ASTNodeAnnotation.Attribute
775      public SimpleSet qualifiedLookupVariable(String name) {
776        {
777            if (type().accessibleFrom(hostType())) {
778              return keepAccessibleFields(type().memberFields(name));
779            }
780            return SimpleSet.emptySet;
781          }
782      }
783      /**
784       * @attribute syn
785       * @aspect PositiveLiterals
786       * @declaredat /home/jesper/git/extendj/java4/frontend/PositiveLiterals.jrag:36
787       */
788      @ASTNodeAnnotation.Attribute
789      public boolean isPositive() {
790        boolean isPositive_value = false;
791    
792        return isPositive_value;
793      }
794      /**
795       * @attribute syn
796       * @aspect Names
797       * @declaredat /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:44
798       */
799      @ASTNodeAnnotation.Attribute
800      public String packageName() {
801        String packageName_value = "";
802    
803        return packageName_value;
804      }
805      /**
806       * @attribute syn
807       * @aspect Names
808       * @declaredat /home/jesper/git/extendj/java4/frontend/QualifiedNames.jrag:72
809       */
810      @ASTNodeAnnotation.Attribute
811      public String typeName() {
812        String typeName_value = "";
813    
814        return typeName_value;
815      }
816      /**
817       * @attribute syn
818       * @aspect AccessTypes
819       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:35
820       */
821      @ASTNodeAnnotation.Attribute
822      public boolean isTypeAccess() {
823        boolean isTypeAccess_value = false;
824    
825        return isTypeAccess_value;
826      }
827      /**
828       * @attribute syn
829       * @aspect AccessTypes
830       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:39
831       */
832      @ASTNodeAnnotation.Attribute
833      public boolean isMethodAccess() {
834        boolean isMethodAccess_value = false;
835    
836        return isMethodAccess_value;
837      }
838      /**
839       * @attribute syn
840       * @aspect AccessTypes
841       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:43
842       */
843      @ASTNodeAnnotation.Attribute
844      public boolean isFieldAccess() {
845        boolean isFieldAccess_value = false;
846    
847        return isFieldAccess_value;
848      }
849      /**
850       * @attribute syn
851       * @aspect AccessTypes
852       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:47
853       */
854      @ASTNodeAnnotation.Attribute
855      public boolean isSuperAccess() {
856        boolean isSuperAccess_value = false;
857    
858        return isSuperAccess_value;
859      }
860      /**
861       * @attribute syn
862       * @aspect AccessTypes
863       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:53
864       */
865      @ASTNodeAnnotation.Attribute
866      public boolean isThisAccess() {
867        boolean isThisAccess_value = false;
868    
869        return isThisAccess_value;
870      }
871      /**
872       * @attribute syn
873       * @aspect AccessTypes
874       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:59
875       */
876      @ASTNodeAnnotation.Attribute
877      public boolean isPackageAccess() {
878        boolean isPackageAccess_value = false;
879    
880        return isPackageAccess_value;
881      }
882      /**
883       * @attribute syn
884       * @aspect AccessTypes
885       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:63
886       */
887      @ASTNodeAnnotation.Attribute
888      public boolean isArrayAccess() {
889        boolean isArrayAccess_value = false;
890    
891        return isArrayAccess_value;
892      }
893      /**
894       * @attribute syn
895       * @aspect AccessTypes
896       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:67
897       */
898      @ASTNodeAnnotation.Attribute
899      public boolean isClassAccess() {
900        boolean isClassAccess_value = false;
901    
902        return isClassAccess_value;
903      }
904      /**
905       * @attribute syn
906       * @aspect AccessTypes
907       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:71
908       */
909      @ASTNodeAnnotation.Attribute
910      public boolean isSuperConstructorAccess() {
911        boolean isSuperConstructorAccess_value = false;
912    
913        return isSuperConstructorAccess_value;
914      }
915      /**
916       * @attribute syn
917       * @aspect QualifiedNames
918       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:77
919       */
920      @ASTNodeAnnotation.Attribute
921      public boolean isLeftChildOfDot() {
922        boolean isLeftChildOfDot_value = hasParentDot() && parentDot().getLeft() == this;
923    
924        return isLeftChildOfDot_value;
925      }
926      /**
927       * @attribute syn
928       * @aspect QualifiedNames
929       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:78
930       */
931      @ASTNodeAnnotation.Attribute
932      public boolean isRightChildOfDot() {
933        boolean isRightChildOfDot_value = hasParentDot() && parentDot().getRight() == this;
934    
935        return isRightChildOfDot_value;
936      }
937      /**
938       * @attribute syn
939       * @aspect QualifiedNames
940       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:92
941       */
942      @ASTNodeAnnotation.Attribute
943      public AbstractDot parentDot() {
944        AbstractDot parentDot_value = getParent() instanceof AbstractDot ?
945            (AbstractDot) getParent() : null;
946    
947        return parentDot_value;
948      }
949      /**
950       * @attribute syn
951       * @aspect QualifiedNames
952       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:94
953       */
954      @ASTNodeAnnotation.Attribute
955      public boolean hasParentDot() {
956        boolean hasParentDot_value = parentDot() != null;
957    
958        return hasParentDot_value;
959      }
960      /**
961       * @attribute syn
962       * @aspect QualifiedNames
963       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:96
964       */
965      @ASTNodeAnnotation.Attribute
966      public Access nextAccess() {
967        Access nextAccess_value = parentDot().nextAccess();
968    
969        return nextAccess_value;
970      }
971      /**
972       * @attribute syn
973       * @aspect QualifiedNames
974       * @declaredat /home/jesper/git/extendj/java4/frontend/ResolveAmbiguousNames.jrag:97
975       */
976      @ASTNodeAnnotation.Attribute
977      public boolean hasNextAccess() {
978        boolean hasNextAccess_value = isLeftChildOfDot();
979    
980        return hasNextAccess_value;
981      }
982      /**
983       * @attribute syn
984       * @aspect NestedTypes
985       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:552
986       */
987      @ASTNodeAnnotation.Attribute
988      public Stmt enclosingStmt() {
989        {
990            ASTNode node = this;
991            while (node != null && !(node instanceof Stmt)) {
992              node = node.getParent();
993            }
994            return (Stmt) node;
995          }
996      }
997      /**
998       * @attribute syn
999       * @aspect TypeCheck
1000       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:36
1001       */
1002      @ASTNodeAnnotation.Attribute
1003      public boolean isVariable() {
1004        boolean isVariable_value = false;
1005    
1006        return isVariable_value;
1007      }
1008      /**
1009       * @attribute syn
1010       * @aspect TypeHierarchyCheck
1011       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:41
1012       */
1013      @ASTNodeAnnotation.Attribute
1014      public boolean isUnknown() {
1015        boolean isUnknown_value = type().isUnknown();
1016    
1017        return isUnknown_value;
1018      }
1019      /**
1020       * @attribute syn
1021       * @aspect TypeHierarchyCheck
1022       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:199
1023       */
1024      @ASTNodeAnnotation.Attribute
1025      public boolean staticContextQualifier() {
1026        boolean staticContextQualifier_value = false;
1027    
1028        return staticContextQualifier_value;
1029      }
1030      /**
1031       * @attribute syn
1032       * @aspect CreateBCode
1033       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:251
1034       */
1035      @ASTNodeAnnotation.Attribute
1036      public boolean needsPop() {
1037        boolean needsPop_value = true;
1038    
1039        return needsPop_value;
1040      }
1041      /**
1042       * @attribute syn
1043       * @aspect CreateBCode
1044       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:263
1045       */
1046      @ASTNodeAnnotation.Attribute
1047      public boolean isVarAccessWithAccessor() {
1048        boolean isVarAccessWithAccessor_value = false;
1049    
1050        return isVarAccessWithAccessor_value;
1051      }
1052      /**
1053       * @attribute syn
1054       * @aspect CreateBCode
1055       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1022
1056       */
1057      @ASTNodeAnnotation.Attribute
1058      public boolean canBeTrue() {
1059        boolean canBeTrue_value = !isFalse();
1060    
1061        return canBeTrue_value;
1062      }
1063      /**
1064       * @attribute syn
1065       * @aspect CreateBCode
1066       * @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1034
1067       */
1068      @ASTNodeAnnotation.Attribute
1069      public boolean canBeFalse() {
1070        boolean canBeFalse_value = !isTrue();
1071    
1072        return canBeFalse_value;
1073      }
1074      /**
1075       * @attribute syn
1076       * @aspect Enums
1077       * @declaredat /home/jesper/git/extendj/java5/frontend/Enums.jrag:576
1078       */
1079      @ASTNodeAnnotation.Attribute
1080      public boolean isEnumConstant() {
1081        boolean isEnumConstant_value = false;
1082    
1083        return isEnumConstant_value;
1084      }
1085      /**
1086       * @apilevel internal
1087       */
1088      protected java.util.Map inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__values;
1089      /**
1090       * @apilevel internal
1091       */
1092      private void inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__reset() {
1093        inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__values = null;
1094      }
1095      /**
1096       * Infers type arguments for this method invocation.
1097       * @attribute syn
1098       * @aspect MethodSignature15
1099       * @declaredat /home/jesper/git/extendj/java5/frontend/MethodSignature.jrag:479
1100       */
1101      @ASTNodeAnnotation.Attribute
1102      public ArrayList<TypeDecl> inferTypeArguments(TypeDecl resultType, List<ParameterDeclaration> params, List<Expr> args, List<TypeVariable> typeParams) {
1103        java.util.List _parameters = new java.util.ArrayList(4);
1104        _parameters.add(resultType);
1105        _parameters.add(params);
1106        _parameters.add(args);
1107        _parameters.add(typeParams);
1108        if (inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__values == null) inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__values = new org.jastadd.util.RobustMap(new java.util.HashMap());
1109        ASTNode$State state = state();
1110        if (inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__values.containsKey(_parameters)) {
1111          return (ArrayList<TypeDecl>) inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__values.get(_parameters);
1112        }
1113        boolean intermediate = state.INTERMEDIATE_VALUE;
1114        state.INTERMEDIATE_VALUE = false;
1115        int num = state.boundariesCrossed;
1116        boolean isFinal = this.is$Final();
1117        ArrayList<TypeDecl> inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__value = inferTypeArguments_compute(resultType, params, args, typeParams);
1118        if (isFinal && num == state().boundariesCrossed) {
1119          inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__values.put(_parameters, inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__value);
1120        } else {
1121        }
1122        state.INTERMEDIATE_VALUE |= intermediate;
1123    
1124        return inferTypeArguments_TypeDecl_List_ParameterDeclaration__List_Expr__List_TypeVariable__value;
1125      }
1126      /**
1127       * @apilevel internal
1128       */
1129      private ArrayList<TypeDecl> inferTypeArguments_compute(TypeDecl resultType, List<ParameterDeclaration> params, List<Expr> args, List<TypeVariable> typeParams) {
1130          ArrayList<TypeDecl> typeArguments = new ArrayList<TypeDecl>();
1131          Collection<TypeDecl> arguments = computeConstraints(
1132              resultType,
1133              params,
1134              args,
1135              typeParams);
1136          if (arguments.isEmpty()) {
1137            return typeArguments;
1138          }
1139          int i = 0;
1140          for (Iterator<TypeDecl> iter = arguments.iterator(); iter.hasNext(); i++) {
1141            TypeDecl typeDecl = iter.next();
1142            if (typeDecl == null) {
1143              TypeVariable v = typeParams.getChild(i);
1144              if (v.getNumTypeBound() == 0) {
1145                typeDecl = typeObject();
1146              } else if (v.getNumTypeBound() == 1) {
1147                typeDecl = v.getTypeBound(0).type();
1148              } else {
1149                typeDecl = v.lubType();
1150              }
1151            }
1152            typeArguments.add(typeDecl);
1153          }
1154          return typeArguments;
1155        }
1156      /**
1157       * Finds the host type declaration of a class access.
1158       * Call this attribute only on expressions that return true for
1159       * isClassAccess or it may throw an error!
1160       * @return The TypeDecl corresponding to the accesssed class
1161       * @attribute syn
1162       * @aspect AnnotationsCodegen
1163       * @declaredat /home/jesper/git/extendj/java5/backend/AnnotationsCodegen.jrag:241
1164       */
1165      @ASTNodeAnnotation.Attribute
1166      public TypeDecl classAccess() {
1167        {
1168            throw new Error(
1169                "Class access can only be computed for class access expressions");
1170          }
1171      }
1172      /**
1173       * @attribute syn
1174       * @aspect PreciseRethrow
1175       * @declaredat /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag:33
1176       */
1177      @ASTNodeAnnotation.Attribute
1178      public Collection<TypeDecl> throwTypes() {
1179        {
1180            Collection<TypeDecl> tts = new LinkedList<TypeDecl>();
1181            tts.add(type());
1182            return tts;
1183          }
1184      }
1185      /**
1186       * @attribute syn
1187       * @aspect PreciseRethrow
1188       * @declaredat /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag:149
1189       */
1190      @ASTNodeAnnotation.Attribute
1191      public boolean modifiedInScope(Variable var) {
1192        boolean modifiedInScope_Variable_value = false;
1193    
1194        return modifiedInScope_Variable_value;
1195      }
1196      /**
1197       * @attribute syn
1198       * @aspect PreciseRethrow
1199       * @declaredat /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag:200
1200       */
1201      @ASTNodeAnnotation.Attribute
1202      public boolean isVariable(Variable var) {
1203        boolean isVariable_Variable_value = false;
1204    
1205        return isVariable_Variable_value;
1206      }
1207      /**
1208       * @apilevel internal
1209       */
1210      protected boolean stmtCompatible_computed = false;
1211      /**
1212       * @apilevel internal
1213       */
1214      protected boolean stmtCompatible_value;
1215      /**
1216       * @apilevel internal
1217       */
1218      private void stmtCompatible_reset() {
1219        stmtCompatible_computed = false;
1220      }
1221      /**
1222       * @attribute syn
1223       * @aspect StmtCompatible
1224       * @declaredat /home/jesper/git/extendj/java8/frontend/LambdaExpr.jrag:137
1225       */
1226      @ASTNodeAnnotation.Attribute
1227      public boolean stmtCompatible() {
1228        ASTNode$State state = state();
1229        if (stmtCompatible_computed) {
1230          return stmtCompatible_value;
1231        }
1232        boolean intermediate = state.INTERMEDIATE_VALUE;
1233        state.INTERMEDIATE_VALUE = false;
1234        int num = state.boundariesCrossed;
1235        boolean isFinal = this.is$Final();
1236        stmtCompatible_value = false;
1237        if (isFinal && num == state().boundariesCrossed) {
1238          stmtCompatible_computed = true;
1239        } else {
1240        }
1241        state.INTERMEDIATE_VALUE |= intermediate;
1242    
1243        return stmtCompatible_value;
1244      }
1245      /**
1246       * @apilevel internal
1247       */
1248      protected java.util.Map compatibleStrictContext_TypeDecl_values;
1249      /**
1250       * @apilevel internal
1251       */
1252      private void compatibleStrictContext_TypeDecl_reset() {
1253        compatibleStrictContext_TypeDecl_values = null;
1254      }
1255      /**
1256       * @attribute syn
1257       * @aspect MethodSignature18
1258       * @declaredat /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag:32
1259       */
1260      @ASTNodeAnnotation.Attribute
1261      public boolean compatibleStrictContext(TypeDecl type) {
1262        Object _parameters = type;
1263        if (compatibleStrictContext_TypeDecl_values == null) compatibleStrictContext_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
1264        ASTNode$State state = state();
1265        if (compatibleStrictContext_TypeDecl_values.containsKey(_parameters)) {
1266          return (Boolean) compatibleStrictContext_TypeDecl_values.get(_parameters);
1267        }
1268        boolean intermediate = state.INTERMEDIATE_VALUE;
1269        state.INTERMEDIATE_VALUE = false;
1270        int num = state.boundariesCrossed;
1271        boolean isFinal = this.is$Final();
1272        boolean compatibleStrictContext_TypeDecl_value = compatibleStrictContext_compute(type);
1273        if (isFinal && num == state().boundariesCrossed) {
1274          compatibleStrictContext_TypeDecl_values.put(_parameters, compatibleStrictContext_TypeDecl_value);
1275        } else {
1276        }
1277        state.INTERMEDIATE_VALUE |= intermediate;
1278    
1279        return compatibleStrictContext_TypeDecl_value;
1280      }
1281      /**
1282       * @apilevel internal
1283       */
1284      private boolean compatibleStrictContext_compute(TypeDecl type) {
1285          return type().instanceOf(type)
1286              || type().withinBounds(type, Parameterization.RAW); // Test subtype of type bounds.
1287        }
1288      /**
1289       * @apilevel internal
1290       */
1291      protected java.util.Map compatibleLooseContext_TypeDecl_values;
1292      /**
1293       * @apilevel internal
1294       */
1295      private void compatibleLooseContext_TypeDecl_reset() {
1296        compatibleLooseContext_TypeDecl_values = null;
1297      }
1298      /**
1299       * @attribute syn
1300       * @aspect MethodSignature18
1301       * @declaredat /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag:79
1302       */
1303      @ASTNodeAnnotation.Attribute
1304      public boolean compatibleLooseContext(TypeDecl type) {
1305        Object _parameters = type;
1306        if (compatibleLooseContext_TypeDecl_values == null) compatibleLooseContext_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
1307        ASTNode$State state = state();
1308        if (compatibleLooseContext_TypeDecl_values.containsKey(_parameters)) {
1309          return (Boolean) compatibleLooseContext_TypeDecl_values.get(_parameters);
1310        }
1311        boolean intermediate = state.INTERMEDIATE_VALUE;
1312        state.INTERMEDIATE_VALUE = false;
1313        int num = state.boundariesCrossed;
1314        boolean isFinal = this.is$Final();
1315        boolean compatibleLooseContext_TypeDecl_value = type().methodInvocationConversionTo(type)
1316              || type().boxed().withinBounds(type, Parameterization.RAW);
1317        if (isFinal && num == state().boundariesCrossed) {
1318          compatibleLooseContext_TypeDecl_values.put(_parameters, compatibleLooseContext_TypeDecl_value);
1319        } else {
1320        }
1321        state.INTERMEDIATE_VALUE |= intermediate;
1322    
1323        return compatibleLooseContext_TypeDecl_value;
1324      }
1325      /**
1326       * @apilevel internal
1327       */
1328      protected java.util.Map pertinentToApplicability_Expr_BodyDecl_int_values;
1329      /**
1330       * @apilevel internal
1331       */
1332      private void pertinentToApplicability_Expr_BodyDecl_int_reset() {
1333        pertinentToApplicability_Expr_BodyDecl_int_values = null;
1334      }
1335      /**
1336       * @attribute syn
1337       * @aspect MethodSignature18
1338       * @declaredat /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag:107
1339       */
1340      @ASTNodeAnnotation.Attribute
1341      public boolean pertinentToApplicability(Expr access, BodyDecl decl, int argIndex) {
1342        java.util.List _parameters = new java.util.ArrayList(3);
1343        _parameters.add(access);
1344        _parameters.add(decl);
1345        _parameters.add(argIndex);
1346        if (pertinentToApplicability_Expr_BodyDecl_int_values == null) pertinentToApplicability_Expr_BodyDecl_int_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
1347        ASTNode$State state = state();
1348        if (pertinentToApplicability_Expr_BodyDecl_int_values.containsKey(_parameters)) {
1349          return (Boolean) pertinentToApplicability_Expr_BodyDecl_int_values.get(_parameters);
1350        }
1351        boolean intermediate = state.INTERMEDIATE_VALUE;
1352        state.INTERMEDIATE_VALUE = false;
1353        int num = state.boundariesCrossed;
1354        boolean isFinal = this.is$Final();
1355        boolean pertinentToApplicability_Expr_BodyDecl_int_value = true;
1356        if (isFinal && num == state().boundariesCrossed) {
1357          pertinentToApplicability_Expr_BodyDecl_int_values.put(_parameters, pertinentToApplicability_Expr_BodyDecl_int_value);
1358        } else {
1359        }
1360        state.INTERMEDIATE_VALUE |= intermediate;
1361    
1362        return pertinentToApplicability_Expr_BodyDecl_int_value;
1363      }
1364      /**
1365       * @apilevel internal
1366       */
1367      protected java.util.Map moreSpecificThan_TypeDecl_TypeDecl_values;
1368      /**
1369       * @apilevel internal
1370       */
1371      private void moreSpecificThan_TypeDecl_TypeDecl_reset() {
1372        moreSpecificThan_TypeDecl_TypeDecl_values = null;
1373      }
1374      /**
1375       * Computes which type is more specific for a specific argument, as defined in 15.12.2.5
1376       * @param type1
1377       * @param type2
1378       * @return {@code true} if type1 is more specific than type2, {@code false} otherwise
1379       * @attribute syn
1380       * @aspect MethodSignature18
1381       * @declaredat /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag:233
1382       */
1383      @ASTNodeAnnotation.Attribute
1384      public boolean moreSpecificThan(TypeDecl type1, TypeDecl type2) {
1385        java.util.List _parameters = new java.util.ArrayList(2);
1386        _parameters.add(type1);
1387        _parameters.add(type2);
1388        if (moreSpecificThan_TypeDecl_TypeDecl_values == null) moreSpecificThan_TypeDecl_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
1389        ASTNode$State state = state();
1390        if (moreSpecificThan_TypeDecl_TypeDecl_values.containsKey(_parameters)) {
1391          return (Boolean) moreSpecificThan_TypeDecl_TypeDecl_values.get(_parameters);
1392        }
1393        boolean intermediate = state.INTERMEDIATE_VALUE;
1394        state.INTERMEDIATE_VALUE = false;
1395        int num = state.boundariesCrossed;
1396        boolean isFinal = this.is$Final();
1397        boolean moreSpecificThan_TypeDecl_TypeDecl_value = type1.instanceOf(type2) || type1.withinBounds(type2, Parameterization.RAW);
1398        if (isFinal && num == state().boundariesCrossed) {
1399          moreSpecificThan_TypeDecl_TypeDecl_values.put(_parameters, moreSpecificThan_TypeDecl_TypeDecl_value);
1400        } else {
1401        }
1402        state.INTERMEDIATE_VALUE |= intermediate;
1403    
1404        return moreSpecificThan_TypeDecl_TypeDecl_value;
1405      }
1406      /**
1407       * @apilevel internal
1408       */
1409      protected java.util.Map potentiallyCompatible_TypeDecl_BodyDecl_values;
1410      /**
1411       * @apilevel internal
1412       */
1413      private void potentiallyCompatible_TypeDecl_BodyDecl_reset() {
1414        potentiallyCompatible_TypeDecl_BodyDecl_values = null;
1415      }
1416      /**
1417       * @attribute syn
1418       * @aspect MethodSignature18
1419       * @declaredat /home/jesper/git/extendj/java8/frontend/MethodSignature.jrag:466
1420       */
1421      @ASTNodeAnnotation.Attribute
1422      public boolean potentiallyCompatible(TypeDecl type, BodyDecl candidateDecl) {
1423        java.util.List _parameters = new java.util.ArrayList(2);
1424        _parameters.add(type);
1425        _parameters.add(candidateDecl);
1426        if (potentiallyCompatible_TypeDecl_BodyDecl_values == null) potentiallyCompatible_TypeDecl_BodyDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
1427        ASTNode$State state = state();
1428        if (potentiallyCompatible_TypeDecl_BodyDecl_values.containsKey(_parameters)) {
1429          return (Boolean) potentiallyCompatible_TypeDecl_BodyDecl_values.get(_parameters);
1430        }
1431        boolean intermediate = state.INTERMEDIATE_VALUE;
1432        state.INTERMEDIATE_VALUE = false;
1433        int num = state.boundariesCrossed;
1434        boolean isFinal = this.is$Final();
1435        boolean potentiallyCompatible_TypeDecl_BodyDecl_value = true;
1436        if (isFinal && num == state().boundariesCrossed) {
1437          potentiallyCompatible_TypeDecl_BodyDecl_values.put(_parameters, potentiallyCompatible_TypeDecl_BodyDecl_value);
1438        } else {
1439        }
1440        state.INTERMEDIATE_VALUE |= intermediate;
1441    
1442        return potentiallyCompatible_TypeDecl_BodyDecl_value;
1443      }
1444      /**
1445       * @apilevel internal
1446       */
1447      protected boolean isBooleanExpression_computed = false;
1448      /**
1449       * @apilevel internal
1450       */
1451      protected boolean isBooleanExpression_value;
1452      /**
1453       * @apilevel internal
1454       */
1455      private void isBooleanExpression_reset() {
1456        isBooleanExpression_computed = false;
1457      }
1458      /**
1459       * @attribute syn
1460       * @aspect PolyExpressions
1461       * @declaredat /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag:29
1462       */
1463      @ASTNodeAnnotation.Attribute
1464      public boolean isBooleanExpression() {
1465        ASTNode$State state = state();
1466        if (isBooleanExpression_computed) {
1467          return isBooleanExpression_value;
1468        }
1469        boolean intermediate = state.INTERMEDIATE_VALUE;
1470        state.INTERMEDIATE_VALUE = false;
1471        int num = state.boundariesCrossed;
1472        boolean isFinal = this.is$Final();
1473        isBooleanExpression_value = !isPolyExpression() && type().isBoolean();
1474        if (isFinal && num == state().boundariesCrossed) {
1475          isBooleanExpression_computed = true;
1476        } else {
1477        }
1478        state.INTERMEDIATE_VALUE |= intermediate;
1479    
1480        return isBooleanExpression_value;
1481      }
1482      /**
1483       * @apilevel internal
1484       */
1485      protected boolean isNumericExpression_computed = false;
1486      /**
1487       * @apilevel internal
1488       */
1489      protected boolean isNumericExpression_value;
1490      /**
1491       * @apilevel internal
1492       */
1493      private void isNumericExpression_reset() {
1494        isNumericExpression_computed = false;
1495      }
1496      /**
1497       * @attribute syn
1498       * @aspect PolyExpressions
1499       * @declaredat /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag:59
1500       */
1501      @ASTNodeAnnotation.Attribute
1502      public boolean isNumericExpression() {
1503        ASTNode$State state = state();
1504        if (isNumericExpression_computed) {
1505          return isNumericExpression_value;
1506        }
1507        boolean intermediate = state.INTERMEDIATE_VALUE;
1508        state.INTERMEDIATE_VALUE = false;
1509        int num = state.boundariesCrossed;
1510        boolean isFinal = this.is$Final();
1511        isNumericExpression_value = !isPolyExpression() && type().isNumericType();
1512        if (isFinal && num == state().boundariesCrossed) {
1513          isNumericExpression_computed = true;
1514        } else {
1515        }
1516        state.INTERMEDIATE_VALUE |= intermediate;
1517    
1518        return isNumericExpression_value;
1519      }
1520      /**
1521       * @apilevel internal
1522       */
1523      protected boolean isPolyExpression_computed = false;
1524      /**
1525       * @apilevel internal
1526       */
1527      protected boolean isPolyExpression_value;
1528      /**
1529       * @apilevel internal
1530       */
1531      private void isPolyExpression_reset() {
1532        isPolyExpression_computed = false;
1533      }
1534      /**
1535       * @attribute syn
1536       * @aspect PolyExpressions
1537       * @declaredat /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag:80
1538       */
1539      @ASTNodeAnnotation.Attribute
1540      public boolean isPolyExpression() {
1541        ASTNode$State state = state();
1542        if (isPolyExpression_computed) {
1543          return isPolyExpression_value;
1544        }
1545        boolean intermediate = state.INTERMEDIATE_VALUE;
1546        state.INTERMEDIATE_VALUE = false;
1547        int num = state.boundariesCrossed;
1548        boolean isFinal = this.is$Final();
1549        isPolyExpression_value = false;
1550        if (isFinal && num == state().boundariesCrossed) {
1551          isPolyExpression_computed = true;
1552        } else {
1553        }
1554        state.INTERMEDIATE_VALUE |= intermediate;
1555    
1556        return isPolyExpression_value;
1557      }
1558      /**
1559       * @apilevel internal
1560       */
1561      protected java.util.Map assignConversionTo_TypeDecl_values;
1562      /**
1563       * @apilevel internal
1564       */
1565      private void assignConversionTo_TypeDecl_reset() {
1566        assignConversionTo_TypeDecl_values = null;
1567      }
1568      /**
1569       * @attribute syn
1570       * @aspect PolyExpressions
1571       * @declaredat /home/jesper/git/extendj/java8/frontend/PolyExpressions.jrag:142
1572       */
1573      @ASTNodeAnnotation.Attribute
1574      public boolean assignConversionTo(TypeDecl type) {
1575        Object _parameters = type;
1576        if (assignConversionTo_TypeDecl_values == null) assignConversionTo_TypeDecl_values = new org.jastadd.util.RobustMap(new java.util.HashMap());
1577        ASTNode$State state = state();
1578        if (assignConversionTo_TypeDecl_values.containsKey(_parameters)) {
1579          return (Boolean) assignConversionTo_TypeDecl_values.get(_parameters);
1580        }
1581        boolean intermediate = state.INTERMEDIATE_VALUE;
1582        state.INTERMEDIATE_VALUE = false;
1583        int num = state.boundariesCrossed;
1584        boolean isFinal = this.is$Final();
1585        boolean assignConversionTo_TypeDecl_value = type().assignConversionTo(type, this);
1586        if (isFinal && num == state().boundariesCrossed) {
1587          assignConversionTo_TypeDecl_values.put(_parameters, assignConversionTo_TypeDecl_value);
1588        } else {
1589        }
1590        state.INTERMEDIATE_VALUE |= intermediate;
1591    
1592        return assignConversionTo_TypeDecl_value;
1593      }
1594      /**
1595       * @attribute inh
1596       * @aspect DefiniteAssignment
1597       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:37
1598       */
1599      /**
1600       * @attribute inh
1601       * @aspect DefiniteAssignment
1602       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:37
1603       */
1604      @ASTNodeAnnotation.Attribute
1605      public boolean isDest() {
1606        boolean isDest_value = getParent().Define_isDest(this, null);
1607    
1608        return isDest_value;
1609      }
1610      /**
1611       * @attribute inh
1612       * @aspect DefiniteAssignment
1613       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:47
1614       */
1615      /**
1616       * @attribute inh
1617       * @aspect DefiniteAssignment
1618       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:47
1619       */
1620      @ASTNodeAnnotation.Attribute
1621      public boolean isSource() {
1622        boolean isSource_value = getParent().Define_isSource(this, null);
1623    
1624        return isSource_value;
1625      }
1626      /**
1627       * @attribute inh
1628       * @aspect DefiniteAssignment
1629       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:71
1630       */
1631      /**
1632       * @attribute inh
1633       * @aspect DefiniteAssignment
1634       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:71
1635       */
1636      @ASTNodeAnnotation.Attribute
1637      public boolean isIncOrDec() {
1638        boolean isIncOrDec_value = getParent().Define_isIncOrDec(this, null);
1639    
1640        return isIncOrDec_value;
1641      }
1642      /**
1643       * @attribute inh
1644       * @aspect DA
1645       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:258
1646       */
1647      /**
1648       * @attribute inh
1649       * @aspect DA
1650       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:258
1651       */
1652      @ASTNodeAnnotation.Attribute
1653      public boolean isDAbefore(Variable v) {
1654        boolean isDAbefore_Variable_value = getParent().Define_isDAbefore(this, null, v);
1655    
1656        return isDAbefore_Variable_value;
1657      }
1658      /**
1659       * @attribute inh
1660       * @aspect DU
1661       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:782
1662       */
1663      /**
1664       * @attribute inh
1665       * @aspect DU
1666       * @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:782
1667       */
1668      @ASTNodeAnnotation.Attribute
1669      public boolean isDUbefore(Variable v) {
1670        boolean isDUbefore_Variable_value = getParent().Define_isDUbefore(this, null, v);
1671    
1672        return isDUbefore_Variable_value;
1673      }
1674      /**
1675       * @attribute inh
1676       * @aspect LookupMethod
1677       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupMethod.jrag:45
1678       */
1679      /**
1680       * @attribute inh
1681       * @aspect LookupMethod
1682       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupMethod.jrag:45
1683       */
1684      @ASTNodeAnnotation.Attribute
1685      public Collection lookupMethod(String name) {
1686        Collection lookupMethod_String_value = getParent().Define_lookupMethod(this, null, name);
1687    
1688        return lookupMethod_String_value;
1689      }
1690      /**
1691       * @attribute inh
1692       * @aspect SpecialClasses
1693       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:74
1694       */
1695      /**
1696       * @attribute inh
1697       * @aspect SpecialClasses
1698       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:74
1699       */
1700      @ASTNodeAnnotation.Attribute
1701      public TypeDecl typeBoolean() {
1702        TypeDecl typeBoolean_value = getParent().Define_typeBoolean(this, null);
1703    
1704        return typeBoolean_value;
1705      }
1706      /**
1707       * @attribute inh
1708       * @aspect SpecialClasses
1709       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:75
1710       */
1711      /**
1712       * @attribute inh
1713       * @aspect SpecialClasses
1714       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:75
1715       */
1716      @ASTNodeAnnotation.Attribute
1717      public TypeDecl typeByte() {
1718        TypeDecl typeByte_value = getParent().Define_typeByte(this, null);
1719    
1720        return typeByte_value;
1721      }
1722      /**
1723       * @attribute inh
1724       * @aspect SpecialClasses
1725       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:76
1726       */
1727      /**
1728       * @attribute inh
1729       * @aspect SpecialClasses
1730       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:76
1731       */
1732      @ASTNodeAnnotation.Attribute
1733      public TypeDecl typeShort() {
1734        TypeDecl typeShort_value = getParent().Define_typeShort(this, null);
1735    
1736        return typeShort_value;
1737      }
1738      /**
1739       * @attribute inh
1740       * @aspect SpecialClasses
1741       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:77
1742       */
1743      /**
1744       * @attribute inh
1745       * @aspect SpecialClasses
1746       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:77
1747       */
1748      @ASTNodeAnnotation.Attribute
1749      public TypeDecl typeChar() {
1750        TypeDecl typeChar_value = getParent().Define_typeChar(this, null);
1751    
1752        return typeChar_value;
1753      }
1754      /**
1755       * @attribute inh
1756       * @aspect SpecialClasses
1757       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:78
1758       */
1759      /**
1760       * @attribute inh
1761       * @aspect SpecialClasses
1762       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:78
1763       */
1764      @ASTNodeAnnotation.Attribute
1765      public TypeDecl typeInt() {
1766        TypeDecl typeInt_value = getParent().Define_typeInt(this, null);
1767    
1768        return typeInt_value;
1769      }
1770      /**
1771       * @attribute inh
1772       * @aspect SpecialClasses
1773       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:79
1774       */
1775      /**
1776       * @attribute inh
1777       * @aspect SpecialClasses
1778       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:79
1779       */
1780      @ASTNodeAnnotation.Attribute
1781      public TypeDecl typeLong() {
1782        TypeDecl typeLong_value = getParent().Define_typeLong(this, null);
1783    
1784        return typeLong_value;
1785      }
1786      /**
1787       * @attribute inh
1788       * @aspect SpecialClasses
1789       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:80
1790       */
1791      /**
1792       * @attribute inh
1793       * @aspect SpecialClasses
1794       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:80
1795       */
1796      @ASTNodeAnnotation.Attribute
1797      public TypeDecl typeFloat() {
1798        TypeDecl typeFloat_value = getParent().Define_typeFloat(this, null);
1799    
1800        return typeFloat_value;
1801      }
1802      /**
1803       * @attribute inh
1804       * @aspect SpecialClasses
1805       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:81
1806       */
1807      /**
1808       * @attribute inh
1809       * @aspect SpecialClasses
1810       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:81
1811       */
1812      @ASTNodeAnnotation.Attribute
1813      public TypeDecl typeDouble() {
1814        TypeDecl typeDouble_value = getParent().Define_typeDouble(this, null);
1815    
1816        return typeDouble_value;
1817      }
1818      /**
1819       * @attribute inh
1820       * @aspect SpecialClasses
1821       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:82
1822       */
1823      /**
1824       * @attribute inh
1825       * @aspect SpecialClasses
1826       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:82
1827       */
1828      @ASTNodeAnnotation.Attribute
1829      public TypeDecl typeString() {
1830        TypeDecl typeString_value = getParent().Define_typeString(this, null);
1831    
1832        return typeString_value;
1833      }
1834      /**
1835       * @attribute inh
1836       * @aspect SpecialClasses
1837       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:83
1838       */
1839      /**
1840       * @attribute inh
1841       * @aspect SpecialClasses
1842       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:83
1843       */
1844      @ASTNodeAnnotation.Attribute
1845      public TypeDecl typeVoid() {
1846        TypeDecl typeVoid_value = getParent().Define_typeVoid(this, null);
1847    
1848        return typeVoid_value;
1849      }
1850      /**
1851       * @attribute inh
1852       * @aspect SpecialClasses
1853       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:84
1854       */
1855      /**
1856       * @attribute inh
1857       * @aspect SpecialClasses
1858       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:84
1859       */
1860      @ASTNodeAnnotation.Attribute
1861      public TypeDecl typeNull() {
1862        TypeDecl typeNull_value = getParent().Define_typeNull(this, null);
1863    
1864        return typeNull_value;
1865      }
1866      /**
1867       * @attribute inh
1868       * @aspect SpecialClasses
1869       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:97
1870       */
1871      /**
1872       * @attribute inh
1873       * @aspect SpecialClasses
1874       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:97
1875       */
1876      @ASTNodeAnnotation.Attribute
1877      public TypeDecl unknownType() {
1878        TypeDecl unknownType_value = getParent().Define_unknownType(this, null);
1879    
1880        return unknownType_value;
1881      }
1882      /**
1883       * @attribute inh
1884       * @aspect LookupFullyQualifiedTypes
1885       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:115
1886       */
1887      /**
1888       * @attribute inh
1889       * @aspect LookupFullyQualifiedTypes
1890       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:115
1891       */
1892      @ASTNodeAnnotation.Attribute
1893      public boolean hasPackage(String packageName) {
1894        boolean hasPackage_String_value = getParent().Define_hasPackage(this, null, packageName);
1895    
1896        return hasPackage_String_value;
1897      }
1898      /**
1899       * @attribute inh
1900       * @aspect LookupFullyQualifiedTypes
1901       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:129
1902       */
1903      /**
1904       * @attribute inh
1905       * @aspect LookupFullyQualifiedTypes
1906       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:129
1907       */
1908      @ASTNodeAnnotation.Attribute
1909      public TypeDecl lookupType(String packageName, String typeName) {
1910        TypeDecl lookupType_String_String_value = getParent().Define_lookupType(this, null, packageName, typeName);
1911    
1912        return lookupType_String_String_value;
1913      }
1914      /**
1915       * @attribute inh
1916       * @aspect TypeScopePropagation
1917       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:341
1918       */
1919      /**
1920       * @attribute inh
1921       * @aspect TypeScopePropagation
1922       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupType.jrag:341
1923       */
1924      @ASTNodeAnnotation.Attribute
1925      public SimpleSet lookupType(String name) {
1926        SimpleSet lookupType_String_value = getParent().Define_lookupType(this, null, name);
1927    
1928        return lookupType_String_value;
1929      }
1930      /**
1931       * @attribute inh
1932       * @aspect VariableScope
1933       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:40
1934       */
1935      /**
1936       * @attribute inh
1937       * @aspect VariableScope
1938       * @declaredat /home/jesper/git/extendj/java4/frontend/LookupVariable.jrag:40
1939       */
1940      @ASTNodeAnnotation.Attribute
1941      public SimpleSet lookupVariable(String name) {
1942        SimpleSet lookupVariable_String_value = getParent().Define_lookupVariable(this, null, name);
1943    
1944        return lookupVariable_String_value;
1945      }
1946      /**
1947       * @attribute inh
1948       * @aspect SyntacticClassification
1949       * @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:36
1950       */
1951      /**
1952       * @attribute inh
1953       * @aspect SyntacticClassification
1954       * @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:36
1955       */
1956      @ASTNodeAnnotation.Attribute
1957      public NameType nameType() {
1958        ASTNode$State state = state();
1959        if (nameType_computed) {
1960          return nameType_value;
1961        }
1962        boolean intermediate = state.INTERMEDIATE_VALUE;
1963        state.INTERMEDIATE_VALUE = false;
1964        int num = state.boundariesCrossed;
1965        boolean isFinal = this.is$Final();
1966        nameType_value = getParent().Define_nameType(this, null);
1967        if (isFinal && num == state().boundariesCrossed) {
1968          nameType_computed = true;
1969        } else {
1970        }
1971        state.INTERMEDIATE_VALUE |= intermediate;
1972    
1973        return nameType_value;
1974      }
1975      /**
1976       * @apilevel internal
1977       */
1978      protected boolean nameType_computed = false;
1979      /**
1980       * @apilevel internal
1981       */
1982      protected NameType nameType_value;
1983      /**
1984       * @apilevel internal
1985       */
1986      private void nameType_reset() {
1987        nameType_computed = false;
1988        nameType_value = null;
1989      }
1990      /**
1991       * @attribute inh
1992       * @aspect NestedTypes
1993       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:560
1994       */
1995      /**
1996       * @attribute inh
1997       * @aspect NestedTypes
1998       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:560
1999       */
2000      @ASTNodeAnnotation.Attribute
2001      public BodyDecl enclosingBodyDecl() {
2002        BodyDecl enclosingBodyDecl_value = getParent().Define_enclosingBodyDecl(this, null);
2003    
2004        return enclosingBodyDecl_value;
2005      }
2006      /**
2007       * @attribute inh
2008       * @aspect NestedTypes
2009       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:622
2010       */
2011      /**
2012       * @attribute inh
2013       * @aspect NestedTypes
2014       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:622
2015       */
2016      @ASTNodeAnnotation.Attribute
2017      public String hostPackage() {
2018        String hostPackage_value = getParent().Define_hostPackage(this, null);
2019    
2020        return hostPackage_value;
2021      }
2022      /**
2023       * @attribute inh
2024       * @aspect NestedTypes
2025       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:638
2026       */
2027      /**
2028       * @attribute inh
2029       * @aspect NestedTypes
2030       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:638
2031       */
2032      @ASTNodeAnnotation.Attribute
2033      public TypeDecl hostType() {
2034        TypeDecl hostType_value = getParent().Define_hostType(this, null);
2035    
2036        return hostType_value;
2037      }
2038      /**
2039       * @attribute inh
2040       * @aspect TypeHierarchyCheck
2041       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:32
2042       */
2043      /**
2044       * @attribute inh
2045       * @aspect TypeHierarchyCheck
2046       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:32
2047       */
2048      @ASTNodeAnnotation.Attribute
2049      public String methodHost() {
2050        String methodHost_value = getParent().Define_methodHost(this, null);
2051    
2052        return methodHost_value;
2053      }
2054      /**
2055       * @attribute inh
2056       * @aspect TypeHierarchyCheck
2057       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:182
2058       */
2059      /**
2060       * @attribute inh
2061       * @aspect TypeHierarchyCheck
2062       * @declaredat /home/jesper/git/extendj/java4/frontend/TypeHierarchyCheck.jrag:182
2063       */
2064      @ASTNodeAnnotation.Attribute
2065      public boolean inStaticContext() {
2066        boolean inStaticContext_value = getParent().Define_inStaticContext(this, null);
2067    
2068        return inStaticContext_value;
2069      }
2070      /**
2071       * @attribute inh
2072       * @aspect GenericMethodsInference
2073       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethodsInference.jrag:58
2074       */
2075      /**
2076       * @attribute inh
2077       * @aspect GenericMethodsInference
2078       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethodsInference.jrag:58
2079       */
2080      @ASTNodeAnnotation.Attribute
2081      public TypeDecl assignConvertedType() {
2082        TypeDecl assignConvertedType_value = getParent().Define_assignConvertedType(this, null);
2083    
2084        return assignConvertedType_value;
2085      }
2086      /**
2087       * @attribute inh
2088       * @aspect GenericMethodsInference
2089       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethodsInference.jrag:68
2090       */
2091      /**
2092       * @attribute inh
2093       * @aspect GenericMethodsInference
2094       * @declaredat /home/jesper/git/extendj/java5/frontend/GenericMethodsInference.jrag:68
2095       */
2096      @ASTNodeAnnotation.Attribute
2097      public TypeDecl typeObject() {
2098        TypeDecl typeObject_value = getParent().Define_typeObject(this, null);
2099    
2100        return typeObject_value;
2101      }
2102      /**
2103       * @attribute inh
2104       * @aspect GenericsTypeAnalysis
2105       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:338
2106       */
2107      /**
2108       * @attribute inh
2109       * @aspect GenericsTypeAnalysis
2110       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:338
2111       */
2112      @ASTNodeAnnotation.Attribute
2113      public boolean inExtendsOrImplements() {
2114        boolean inExtendsOrImplements_value = getParent().Define_inExtendsOrImplements(this, null);
2115    
2116        return inExtendsOrImplements_value;
2117      }
2118      /**
2119       * @attribute inh
2120       * @aspect TargetType
2121       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:30
2122       */
2123      /**
2124       * @attribute inh
2125       * @aspect TargetType
2126       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:30
2127       */
2128      @ASTNodeAnnotation.Attribute
2129      public TypeDecl targetType() {
2130        ASTNode$State state = state();
2131        if (targetType_computed) {
2132          return targetType_value;
2133        }
2134        boolean intermediate = state.INTERMEDIATE_VALUE;
2135        state.INTERMEDIATE_VALUE = false;
2136        int num = state.boundariesCrossed;
2137        boolean isFinal = this.is$Final();
2138        targetType_value = getParent().Define_targetType(this, null);
2139        if (isFinal && num == state().boundariesCrossed) {
2140          targetType_computed = true;
2141        } else {
2142        }
2143        state.INTERMEDIATE_VALUE |= intermediate;
2144    
2145        return targetType_value;
2146      }
2147      /**
2148       * @apilevel internal
2149       */
2150      protected boolean targetType_computed = false;
2151      /**
2152       * @apilevel internal
2153       */
2154      protected TypeDecl targetType_value;
2155      /**
2156       * @apilevel internal
2157       */
2158      private void targetType_reset() {
2159        targetType_computed = false;
2160        targetType_value = null;
2161      }
2162      /**
2163       * @attribute inh
2164       * @aspect Contexts
2165       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:196
2166       */
2167      /**
2168       * @attribute inh
2169       * @aspect Contexts
2170       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:196
2171       */
2172      @ASTNodeAnnotation.Attribute
2173      public boolean assignmentContext() {
2174        ASTNode$State state = state();
2175        if (assignmentContext_computed) {
2176          return assignmentContext_value;
2177        }
2178        boolean intermediate = state.INTERMEDIATE_VALUE;
2179        state.INTERMEDIATE_VALUE = false;
2180        int num = state.boundariesCrossed;
2181        boolean isFinal = this.is$Final();
2182        assignmentContext_value = getParent().Define_assignmentContext(this, null);
2183        if (isFinal && num == state().boundariesCrossed) {
2184          assignmentContext_computed = true;
2185        } else {
2186        }
2187        state.INTERMEDIATE_VALUE |= intermediate;
2188    
2189        return assignmentContext_value;
2190      }
2191      /**
2192       * @apilevel internal
2193       */
2194      protected boolean assignmentContext_computed = false;
2195      /**
2196       * @apilevel internal
2197       */
2198      protected boolean assignmentContext_value;
2199      /**
2200       * @apilevel internal
2201       */
2202      private void assignmentContext_reset() {
2203        assignmentContext_computed = false;
2204      }
2205      /**
2206       * @attribute inh
2207       * @aspect Contexts
2208       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:197
2209       */
2210      /**
2211       * @attribute inh
2212       * @aspect Contexts
2213       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:197
2214       */
2215      @ASTNodeAnnotation.Attribute
2216      public boolean invocationContext() {
2217        ASTNode$State state = state();
2218        if (invocationContext_computed) {
2219          return invocationContext_value;
2220        }
2221        boolean intermediate = state.INTERMEDIATE_VALUE;
2222        state.INTERMEDIATE_VALUE = false;
2223        int num = state.boundariesCrossed;
2224        boolean isFinal = this.is$Final();
2225        invocationContext_value = getParent().Define_invocationContext(this, null);
2226        if (isFinal && num == state().boundariesCrossed) {
2227          invocationContext_computed = true;
2228        } else {
2229        }
2230        state.INTERMEDIATE_VALUE |= intermediate;
2231    
2232        return invocationContext_value;
2233      }
2234      /**
2235       * @apilevel internal
2236       */
2237      protected boolean invocationContext_computed = false;
2238      /**
2239       * @apilevel internal
2240       */
2241      protected boolean invocationContext_value;
2242      /**
2243       * @apilevel internal
2244       */
2245      private void invocationContext_reset() {
2246        invocationContext_computed = false;
2247      }
2248      /**
2249       * @attribute inh
2250       * @aspect Contexts
2251       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:198
2252       */
2253      /**
2254       * @attribute inh
2255       * @aspect Contexts
2256       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:198
2257       */
2258      @ASTNodeAnnotation.Attribute
2259      public boolean castContext() {
2260        ASTNode$State state = state();
2261        if (castContext_computed) {
2262          return castContext_value;
2263        }
2264        boolean intermediate = state.INTERMEDIATE_VALUE;
2265        state.INTERMEDIATE_VALUE = false;
2266        int num = state.boundariesCrossed;
2267        boolean isFinal = this.is$Final();
2268        castContext_value = getParent().Define_castContext(this, null);
2269        if (isFinal && num == state().boundariesCrossed) {
2270          castContext_computed = true;
2271        } else {
2272        }
2273        state.INTERMEDIATE_VALUE |= intermediate;
2274    
2275        return castContext_value;
2276      }
2277      /**
2278       * @apilevel internal
2279       */
2280      protected boolean castContext_computed = false;
2281      /**
2282       * @apilevel internal
2283       */
2284      protected boolean castContext_value;
2285      /**
2286       * @apilevel internal
2287       */
2288      private void castContext_reset() {
2289        castContext_computed = false;
2290      }
2291      /**
2292       * @attribute inh
2293       * @aspect Contexts
2294       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:199
2295       */
2296      /**
2297       * @attribute inh
2298       * @aspect Contexts
2299       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:199
2300       */
2301      @ASTNodeAnnotation.Attribute
2302      public boolean stringContext() {
2303        ASTNode$State state = state();
2304        if (stringContext_computed) {
2305          return stringContext_value;
2306        }
2307        boolean intermediate = state.INTERMEDIATE_VALUE;
2308        state.INTERMEDIATE_VALUE = false;
2309        int num = state.boundariesCrossed;
2310        boolean isFinal = this.is$Final();
2311        stringContext_value = getParent().Define_stringContext(this, null);
2312        if (isFinal && num == state().boundariesCrossed) {
2313          stringContext_computed = true;
2314        } else {
2315        }
2316        state.INTERMEDIATE_VALUE |= intermediate;
2317    
2318        return stringContext_value;
2319      }
2320      /**
2321       * @apilevel internal
2322       */
2323      protected boolean stringContext_computed = false;
2324      /**
2325       * @apilevel internal
2326       */
2327      protected boolean stringContext_value;
2328      /**
2329       * @apilevel internal
2330       */
2331      private void stringContext_reset() {
2332        stringContext_computed = false;
2333      }
2334      /**
2335       * @attribute inh
2336       * @aspect Contexts
2337       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:200
2338       */
2339      /**
2340       * @attribute inh
2341       * @aspect Contexts
2342       * @declaredat /home/jesper/git/extendj/java8/frontend/TargetType.jrag:200
2343       */
2344      @ASTNodeAnnotation.Attribute
2345      public boolean numericContext() {
2346        ASTNode$State state = state();
2347        if (numericContext_computed) {
2348          return numericContext_value;
2349        }
2350        boolean intermediate = state.INTERMEDIATE_VALUE;
2351        state.INTERMEDIATE_VALUE = false;
2352        int num = state.boundariesCrossed;
2353        boolean isFinal = this.is$Final();
2354        numericContext_value = getParent().Define_numericContext(this, null);
2355        if (isFinal && num == state().boundariesCrossed) {
2356          numericContext_computed = true;
2357        } else {
2358        }
2359        state.INTERMEDIATE_VALUE |= intermediate;
2360    
2361        return numericContext_value;
2362      }
2363      /**
2364       * @apilevel internal
2365       */
2366      protected boolean numericContext_computed = false;
2367      /**
2368       * @apilevel internal
2369       */
2370      protected boolean numericContext_value;
2371      /**
2372       * @apilevel internal
2373       */
2374      private void numericContext_reset() {
2375        numericContext_computed = false;
2376      }
2377      /**
2378       * @apilevel internal
2379       */
2380      public ASTNode rewriteTo() {
2381        return super.rewriteTo();
2382      }
2383    }