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     * A catch parameter with disjunct exception type.
026     * @ast node
027     * @declaredat /home/jesper/git/extendj/java7/grammar/MultiCatch.ast:19
028     * @production CatchParameterDeclaration : {@link ASTNode} ::= <span class="component">{@link Modifiers}</span> <span class="component">TypeAccess:{@link Access}*</span> <span class="component">&lt;ID:String&gt;</span>;
029    
030     */
031    public class CatchParameterDeclaration extends ASTNode<ASTNode> implements Cloneable, Variable, SimpleSet, Iterator {
032      /**
033       * @aspect MultiCatch
034       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:85
035       */
036      public SimpleSet add(Object o) {
037        return new SimpleSetImpl().add(this).add(o);
038      }
039      /**
040       * @aspect MultiCatch
041       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:89
042       */
043      public boolean isSingleton() { return true; }
044      /**
045       * @aspect MultiCatch
046       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:90
047       */
048      public boolean isSingleton(Object o) { return contains(o); }
049      /**
050       * @aspect MultiCatch
051       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:93
052       */
053      private CatchParameterDeclaration iterElem;
054      /**
055       * @aspect MultiCatch
056       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:94
057       */
058      public Iterator iterator() { iterElem = this; return this; }
059      /**
060       * @aspect MultiCatch
061       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:95
062       */
063      public boolean hasNext() { return iterElem != null; }
064      /**
065       * @aspect MultiCatch
066       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:96
067       */
068      public Object next() { Object o = iterElem; iterElem = null; return o; }
069      /**
070       * @aspect MultiCatch
071       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:97
072       */
073      public void remove() { throw new UnsupportedOperationException(); }
074      /**
075       * Type checking.
076       * The types given in a disjunction type may not be
077       * subtypes of each other.
078       * @aspect MultiCatch
079       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:131
080       */
081      public void typeCheck() {
082        boolean pass = true;
083        for (int i = 0; i < getNumTypeAccess(); ++i) {
084          for (int j = 0; j < getNumTypeAccess(); ++j) {
085            if (i == j) {
086              continue;
087            }
088            TypeDecl t1 = getTypeAccess(i).type();
089            TypeDecl t2 = getTypeAccess(j).type();
090            if (t2.instanceOf(t1)) {
091              errorf("%s is a subclass of %s, which is not allowed in multi-catch type alternatives",
092                  t2.fullName(), t1.fullName());
093              pass = false;
094            }
095          }
096        }
097      }
098      /**
099       * @aspect Java7PrettyPrint
100       * @declaredat /home/jesper/git/extendj/java7/frontend/PrettyPrint.jadd:39
101       */
102      public void prettyPrint(PrettyPrinter out) {
103        out.print(getModifiers());
104        out.join(getTypeAccessList(), new PrettyPrinter.Joiner() {
105          @Override
106          public void printSeparator(PrettyPrinter out) {
107            out.print(" | ");
108          }
109        });
110        out.print(" ");
111        out.print(getID());
112      }
113      /**
114       * @declaredat ASTNode:1
115       */
116      public CatchParameterDeclaration() {
117        super();
118      }
119      /**
120       * Initializes the child array to the correct size.
121       * Initializes List and Opt nta children.
122       * @apilevel internal
123       * @ast method
124       * @declaredat ASTNode:10
125       */
126      public void init$Children() {
127        children = new ASTNode[2];
128        setChild(new List(), 1);
129      }
130      /**
131       * @declaredat ASTNode:14
132       */
133      public CatchParameterDeclaration(Modifiers p0, List<Access> p1, String p2) {
134        setChild(p0, 0);
135        setChild(p1, 1);
136        setID(p2);
137      }
138      /**
139       * @declaredat ASTNode:19
140       */
141      public CatchParameterDeclaration(Modifiers p0, List<Access> p1, beaver.Symbol p2) {
142        setChild(p0, 0);
143        setChild(p1, 1);
144        setID(p2);
145      }
146      /**
147       * @apilevel low-level
148       * @declaredat ASTNode:27
149       */
150      protected int numChildren() {
151        return 2;
152      }
153      /**
154       * @apilevel internal
155       * @declaredat ASTNode:33
156       */
157      public boolean mayHaveRewrite() {
158        return false;
159      }
160      /**
161       * @apilevel internal
162       * @declaredat ASTNode:39
163       */
164      public void flushAttrCache() {
165        super.flushAttrCache();
166        sourceVariableDecl_reset();
167        throwTypes_reset();
168        isEffectivelyFinal_reset();
169        localNum_reset();
170      }
171      /**
172       * @apilevel internal
173       * @declaredat ASTNode:49
174       */
175      public void flushCollectionCache() {
176        super.flushCollectionCache();
177      }
178      /**
179       * @apilevel internal
180       * @declaredat ASTNode:55
181       */
182      public void flushRewriteCache() {
183        super.flushRewriteCache();
184      }
185      /**
186       * @apilevel internal
187       * @declaredat ASTNode:61
188       */
189      public CatchParameterDeclaration clone() throws CloneNotSupportedException {
190        CatchParameterDeclaration node = (CatchParameterDeclaration) super.clone();
191        return node;
192      }
193      /**
194       * @apilevel internal
195       * @declaredat ASTNode:68
196       */
197      public CatchParameterDeclaration copy() {
198        try {
199          CatchParameterDeclaration node = (CatchParameterDeclaration) clone();
200          node.parent = null;
201          if (children != null) {
202            node.children = (ASTNode[]) children.clone();
203          }
204          return node;
205        } catch (CloneNotSupportedException e) {
206          throw new Error("Error: clone not supported for " + getClass().getName());
207        }
208      }
209      /**
210       * Create a deep copy of the AST subtree at this node.
211       * The copy is dangling, i.e. has no parent.
212       * @return dangling copy of the subtree at this node
213       * @apilevel low-level
214       * @deprecated Please use treeCopy or treeCopyNoTransform instead
215       * @declaredat ASTNode:87
216       */
217      @Deprecated
218      public CatchParameterDeclaration fullCopy() {
219        return treeCopyNoTransform();
220      }
221      /**
222       * Create a deep copy of the AST subtree at this node.
223       * The copy is dangling, i.e. has no parent.
224       * @return dangling copy of the subtree at this node
225       * @apilevel low-level
226       * @declaredat ASTNode:97
227       */
228      public CatchParameterDeclaration treeCopyNoTransform() {
229        CatchParameterDeclaration tree = (CatchParameterDeclaration) copy();
230        if (children != null) {
231          for (int i = 0; i < children.length; ++i) {
232            ASTNode child = (ASTNode) children[i];
233            if (child != null) {
234              child = child.treeCopyNoTransform();
235              tree.setChild(child, i);
236            }
237          }
238        }
239        return tree;
240      }
241      /**
242       * Create a deep copy of the AST subtree at this node.
243       * The subtree of this node is traversed to trigger rewrites before copy.
244       * The copy is dangling, i.e. has no parent.
245       * @return dangling copy of the subtree at this node
246       * @apilevel low-level
247       * @declaredat ASTNode:117
248       */
249      public CatchParameterDeclaration treeCopy() {
250        doFullTraversal();
251        return treeCopyNoTransform();
252      }
253      /**
254       * @apilevel internal
255       * @declaredat ASTNode:124
256       */
257      protected boolean is$Equal(ASTNode node) {
258        return super.is$Equal(node) && (tokenString_ID == ((CatchParameterDeclaration)node).tokenString_ID);    
259      }
260      /**
261       * Replaces the Modifiers child.
262       * @param node The new node to replace the Modifiers child.
263       * @apilevel high-level
264       */
265      public void setModifiers(Modifiers node) {
266        setChild(node, 0);
267      }
268      /**
269       * Retrieves the Modifiers child.
270       * @return The current node used as the Modifiers child.
271       * @apilevel high-level
272       */
273      @ASTNodeAnnotation.Child(name="Modifiers")
274      public Modifiers getModifiers() {
275        return (Modifiers) getChild(0);
276      }
277      /**
278       * Retrieves the Modifiers child.
279       * <p><em>This method does not invoke AST transformations.</em></p>
280       * @return The current node used as the Modifiers child.
281       * @apilevel low-level
282       */
283      public Modifiers getModifiersNoTransform() {
284        return (Modifiers) getChildNoTransform(0);
285      }
286      /**
287       * Replaces the TypeAccess list.
288       * @param list The new list node to be used as the TypeAccess list.
289       * @apilevel high-level
290       */
291      public void setTypeAccessList(List<Access> list) {
292        setChild(list, 1);
293      }
294      /**
295       * Retrieves the number of children in the TypeAccess list.
296       * @return Number of children in the TypeAccess list.
297       * @apilevel high-level
298       */
299      public int getNumTypeAccess() {
300        return getTypeAccessList().getNumChild();
301      }
302      /**
303       * Retrieves the number of children in the TypeAccess list.
304       * Calling this method will not trigger rewrites.
305       * @return Number of children in the TypeAccess list.
306       * @apilevel low-level
307       */
308      public int getNumTypeAccessNoTransform() {
309        return getTypeAccessListNoTransform().getNumChildNoTransform();
310      }
311      /**
312       * Retrieves the element at index {@code i} in the TypeAccess list.
313       * @param i Index of the element to return.
314       * @return The element at position {@code i} in the TypeAccess list.
315       * @apilevel high-level
316       */
317      public Access getTypeAccess(int i) {
318        return (Access) getTypeAccessList().getChild(i);
319      }
320      /**
321       * Check whether the TypeAccess list has any children.
322       * @return {@code true} if it has at least one child, {@code false} otherwise.
323       * @apilevel high-level
324       */
325      public boolean hasTypeAccess() {
326        return getTypeAccessList().getNumChild() != 0;
327      }
328      /**
329       * Append an element to the TypeAccess list.
330       * @param node The element to append to the TypeAccess list.
331       * @apilevel high-level
332       */
333      public void addTypeAccess(Access node) {
334        List<Access> list = (parent == null) ? getTypeAccessListNoTransform() : getTypeAccessList();
335        list.addChild(node);
336      }
337      /**
338       * @apilevel low-level
339       */
340      public void addTypeAccessNoTransform(Access node) {
341        List<Access> list = getTypeAccessListNoTransform();
342        list.addChild(node);
343      }
344      /**
345       * Replaces the TypeAccess list element at index {@code i} with the new node {@code node}.
346       * @param node The new node to replace the old list element.
347       * @param i The list index of the node to be replaced.
348       * @apilevel high-level
349       */
350      public void setTypeAccess(Access node, int i) {
351        List<Access> list = getTypeAccessList();
352        list.setChild(node, i);
353      }
354      /**
355       * Retrieves the TypeAccess list.
356       * @return The node representing the TypeAccess list.
357       * @apilevel high-level
358       */
359      @ASTNodeAnnotation.ListChild(name="TypeAccess")
360      public List<Access> getTypeAccessList() {
361        List<Access> list = (List<Access>) getChild(1);
362        return list;
363      }
364      /**
365       * Retrieves the TypeAccess list.
366       * <p><em>This method does not invoke AST transformations.</em></p>
367       * @return The node representing the TypeAccess list.
368       * @apilevel low-level
369       */
370      public List<Access> getTypeAccessListNoTransform() {
371        return (List<Access>) getChildNoTransform(1);
372      }
373      /**
374       * Retrieves the TypeAccess list.
375       * @return The node representing the TypeAccess list.
376       * @apilevel high-level
377       */
378      public List<Access> getTypeAccesss() {
379        return getTypeAccessList();
380      }
381      /**
382       * Retrieves the TypeAccess list.
383       * <p><em>This method does not invoke AST transformations.</em></p>
384       * @return The node representing the TypeAccess list.
385       * @apilevel low-level
386       */
387      public List<Access> getTypeAccesssNoTransform() {
388        return getTypeAccessListNoTransform();
389      }
390      /**
391       * Replaces the lexeme ID.
392       * @param value The new value for the lexeme ID.
393       * @apilevel high-level
394       */
395      public void setID(String value) {
396        tokenString_ID = value;
397      }
398      /**
399       * @apilevel internal
400       */
401      protected String tokenString_ID;
402      /**
403       */
404      public int IDstart;
405      /**
406       */
407      public int IDend;
408      /**
409       * JastAdd-internal setter for lexeme ID using the Beaver parser.
410       * @param symbol Symbol containing the new value for the lexeme ID
411       * @apilevel internal
412       */
413      public void setID(beaver.Symbol symbol) {
414        if (symbol.value != null && !(symbol.value instanceof String))
415        throw new UnsupportedOperationException("setID is only valid for String lexemes");
416        tokenString_ID = (String)symbol.value;
417        IDstart = symbol.getStart();
418        IDend = symbol.getEnd();
419      }
420      /**
421       * Retrieves the value for the lexeme ID.
422       * @return The value for the lexeme ID.
423       * @apilevel high-level
424       */
425      @ASTNodeAnnotation.Token(name="ID")
426      public String getID() {
427        return tokenString_ID != null ? tokenString_ID : "";
428      }
429      /**
430       * @aspect Java8NameCheck
431       * @declaredat /home/jesper/git/extendj/java8/frontend/NameCheck.jrag:71
432       */
433       
434      public void nameCheck() {
435        SimpleSet decls = outerScope().lookupVariable(name());
436        for (Iterator iter = decls.iterator(); iter.hasNext(); ) {
437          Variable var = (Variable) iter.next();
438          if (var instanceof VariableDeclaration) {
439            VariableDeclaration decl = (VariableDeclaration) var;
440            if (decl.enclosingBodyDecl() == enclosingBodyDecl()) {
441              errorf("duplicate declaration of catch parameter %s", name());
442            }
443          } else if (var instanceof ParameterDeclaration) {
444            ParameterDeclaration decl = (ParameterDeclaration) var;
445            if (decl.enclosingBodyDecl() == enclosingBodyDecl()) {
446              errorf("duplicate declaration of catch parameter %s", name());
447            }
448          } else if (var instanceof InferredParameterDeclaration) {
449            InferredParameterDeclaration decl = (InferredParameterDeclaration) var;
450            if (decl.enclosingBodyDecl() == enclosingBodyDecl()) {
451              errorf("duplicate declaration of catch parameter %s", name());
452            }
453          } else if (var instanceof CatchParameterDeclaration) {
454            CatchParameterDeclaration decl = (CatchParameterDeclaration) var;
455            if (decl.enclosingBodyDecl() == enclosingBodyDecl()) {
456              errorf("duplicate declaration of catch parameter %s", name());
457            }
458          }
459        }
460    
461        // 8.4.1
462        if (!lookupVariable(name()).contains(this)) {
463          errorf("duplicate declaration of catch parameter %s", name());
464        }
465      }
466      /**
467       * @attribute syn
468       * @aspect MultiCatch
469       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:39
470       */
471      @ASTNodeAnnotation.Attribute
472      public boolean isParameter() {
473        boolean isParameter_value = true;
474    
475        return isParameter_value;
476      }
477      /**
478       * @attribute syn
479       * @aspect MultiCatch
480       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:42
481       */
482      @ASTNodeAnnotation.Attribute
483      public boolean isClassVariable() {
484        boolean isClassVariable_value = false;
485    
486        return isClassVariable_value;
487      }
488      /**
489       * @attribute syn
490       * @aspect MultiCatch
491       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:43
492       */
493      @ASTNodeAnnotation.Attribute
494      public boolean isInstanceVariable() {
495        boolean isInstanceVariable_value = false;
496    
497        return isInstanceVariable_value;
498      }
499      /**
500       * @attribute syn
501       * @aspect MultiCatch
502       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:47
503       */
504      @ASTNodeAnnotation.Attribute
505      public boolean isLocalVariable() {
506        boolean isLocalVariable_value = false;
507    
508        return isLocalVariable_value;
509      }
510      /**
511       * The catch parameter of a multi-catch clause is implicitly final.
512       * @attribute syn
513       * @aspect MultiCatch
514       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:56
515       */
516      @ASTNodeAnnotation.Attribute
517      public boolean isFinal() {
518        boolean isFinal_value = true;
519    
520        return isFinal_value;
521      }
522      /**
523       * @attribute syn
524       * @aspect MultiCatch
525       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:57
526       */
527      @ASTNodeAnnotation.Attribute
528      public boolean isVolatile() {
529        boolean isVolatile_value = getModifiers().isVolatile();
530    
531        return isVolatile_value;
532      }
533      /**
534       * @attribute syn
535       * @aspect MultiCatch
536       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:58
537       */
538      @ASTNodeAnnotation.Attribute
539      public boolean isBlank() {
540        boolean isBlank_value = false;
541    
542        return isBlank_value;
543      }
544      /**
545       * @attribute syn
546       * @aspect MultiCatch
547       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:59
548       */
549      @ASTNodeAnnotation.Attribute
550      public boolean isStatic() {
551        boolean isStatic_value = false;
552    
553        return isStatic_value;
554      }
555      /**
556       * @attribute syn
557       * @aspect MultiCatch
558       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:61
559       */
560      @ASTNodeAnnotation.Attribute
561      public String name() {
562        String name_value = getID();
563    
564        return name_value;
565      }
566      /**
567       * @attribute syn
568       * @aspect MultiCatch
569       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:63
570       */
571      @ASTNodeAnnotation.Attribute
572      public boolean hasInit() {
573        boolean hasInit_value = false;
574    
575        return hasInit_value;
576      }
577      /**
578       * @attribute syn
579       * @aspect MultiCatch
580       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:64
581       */
582      @ASTNodeAnnotation.Attribute
583      public Expr getInit() {
584        {
585            throw new UnsupportedOperationException();
586          }
587      }
588      /**
589       * @attribute syn
590       * @aspect MultiCatch
591       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:67
592       */
593      @ASTNodeAnnotation.Attribute
594      public Constant constant() {
595        {
596            throw new UnsupportedOperationException();
597          }
598      }
599      /**
600       * @attribute syn
601       * @aspect MultiCatch
602       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:72
603       */
604      @ASTNodeAnnotation.Attribute
605      public boolean isSynthetic() {
606        boolean isSynthetic_value = getModifiers().isSynthetic();
607    
608        return isSynthetic_value;
609      }
610      /**
611       * @apilevel internal
612       */
613      protected boolean sourceVariableDecl_computed = false;
614      /**
615       * @apilevel internal
616       */
617      protected Variable sourceVariableDecl_value;
618      /**
619       * @apilevel internal
620       */
621      private void sourceVariableDecl_reset() {
622        sourceVariableDecl_computed = false;
623        sourceVariableDecl_value = null;
624      }
625      /**
626       * @attribute syn
627       * @aspect SourceDeclarations
628       * @declaredat /home/jesper/git/extendj/java5/frontend/Generics.jrag:1637
629       */
630      @ASTNodeAnnotation.Attribute
631      public Variable sourceVariableDecl() {
632        ASTNode$State state = state();
633        if (sourceVariableDecl_computed) {
634          return sourceVariableDecl_value;
635        }
636        boolean intermediate = state.INTERMEDIATE_VALUE;
637        state.INTERMEDIATE_VALUE = false;
638        int num = state.boundariesCrossed;
639        boolean isFinal = this.is$Final();
640        sourceVariableDecl_value = this;
641        if (isFinal && num == state().boundariesCrossed) {
642          sourceVariableDecl_computed = true;
643        } else {
644        }
645        state.INTERMEDIATE_VALUE |= intermediate;
646    
647        return sourceVariableDecl_value;
648      }
649      /**
650       * @attribute syn
651       * @aspect MultiCatch
652       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:83
653       */
654      @ASTNodeAnnotation.Attribute
655      public int size() {
656        int size_value = 1;
657    
658        return size_value;
659      }
660      /**
661       * @attribute syn
662       * @aspect MultiCatch
663       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:84
664       */
665      @ASTNodeAnnotation.Attribute
666      public boolean isEmpty() {
667        boolean isEmpty_value = false;
668    
669        return isEmpty_value;
670      }
671      /**
672       * @attribute syn
673       * @aspect MultiCatch
674       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:88
675       */
676      @ASTNodeAnnotation.Attribute
677      public boolean contains(Object o) {
678        boolean contains_Object_value = this == o;
679    
680        return contains_Object_value;
681      }
682      /**
683       * A catch parameter declared with a disjunction type has the
684       * effective type lub(t1, t2, ...)
685       * 
686       * @see "JLSv3 &sect;15.12.2.7"
687       * @attribute syn
688       * @aspect MultiCatch
689       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:175
690       */
691      @ASTNodeAnnotation.Attribute
692      public TypeDecl type() {
693        {
694            ArrayList<TypeDecl> list = new ArrayList<TypeDecl>();
695            for (int i = 0; i < getNumTypeAccess(); i++)
696              list.add(getTypeAccess(i).type());
697            return lookupLUBType(list).lub();
698          }
699      }
700      /**
701       * @apilevel internal
702       */
703      protected boolean throwTypes_computed = false;
704      /**
705       * @apilevel internal
706       */
707      protected Collection<TypeDecl> throwTypes_value;
708      /**
709       * @apilevel internal
710       */
711      private void throwTypes_reset() {
712        throwTypes_computed = false;
713        throwTypes_value = null;
714      }
715      /**
716       * @attribute syn
717       * @aspect PreciseRethrow
718       * @declaredat /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag:62
719       */
720      @ASTNodeAnnotation.Attribute
721      public Collection<TypeDecl> throwTypes() {
722        ASTNode$State state = state();
723        if (throwTypes_computed) {
724          return throwTypes_value;
725        }
726        boolean intermediate = state.INTERMEDIATE_VALUE;
727        state.INTERMEDIATE_VALUE = false;
728        int num = state.boundariesCrossed;
729        boolean isFinal = this.is$Final();
730        throwTypes_value = catchClause().caughtExceptions();
731        if (isFinal && num == state().boundariesCrossed) {
732          throwTypes_computed = true;
733        } else {
734        }
735        state.INTERMEDIATE_VALUE |= intermediate;
736    
737        return throwTypes_value;
738      }
739      /**
740       * @apilevel internal
741       */
742      protected boolean isEffectivelyFinal_computed = false;
743      /**
744       * @apilevel internal
745       */
746      protected boolean isEffectivelyFinal_value;
747      /**
748       * @apilevel internal
749       */
750      private void isEffectivelyFinal_reset() {
751        isEffectivelyFinal_computed = false;
752      }
753      /**
754       * @attribute syn
755       * @aspect EffectivelyFinal
756       * @declaredat /home/jesper/git/extendj/java8/frontend/EffectivelyFinal.jrag:143
757       */
758      @ASTNodeAnnotation.Attribute
759      public boolean isEffectivelyFinal() {
760        ASTNode$State state = state();
761        if (isEffectivelyFinal_computed) {
762          return isEffectivelyFinal_value;
763        }
764        boolean intermediate = state.INTERMEDIATE_VALUE;
765        state.INTERMEDIATE_VALUE = false;
766        int num = state.boundariesCrossed;
767        boolean isFinal = this.is$Final();
768        isEffectivelyFinal_value = true;
769        if (isFinal && num == state().boundariesCrossed) {
770          isEffectivelyFinal_computed = true;
771        } else {
772        }
773        state.INTERMEDIATE_VALUE |= intermediate;
774    
775        return isEffectivelyFinal_value;
776      }
777      /**
778       * Inherit the lookupVariable attribute.
779       * @attribute inh
780       * @aspect MultiCatch
781       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:36
782       */
783      /**
784       * Inherit the lookupVariable attribute.
785       * @attribute inh
786       * @aspect MultiCatch
787       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:36
788       */
789      @ASTNodeAnnotation.Attribute
790      public SimpleSet lookupVariable(String name) {
791        SimpleSet lookupVariable_String_value = getParent().Define_lookupVariable(this, null, name);
792    
793        return lookupVariable_String_value;
794      }
795      /**
796       * @attribute inh
797       * @aspect MultiCatch
798       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:44
799       */
800      /**
801       * @attribute inh
802       * @aspect MultiCatch
803       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:44
804       */
805      @ASTNodeAnnotation.Attribute
806      public boolean isMethodParameter() {
807        boolean isMethodParameter_value = getParent().Define_isMethodParameter(this, null);
808    
809        return isMethodParameter_value;
810      }
811      /**
812       * @attribute inh
813       * @aspect MultiCatch
814       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:45
815       */
816      /**
817       * @attribute inh
818       * @aspect MultiCatch
819       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:45
820       */
821      @ASTNodeAnnotation.Attribute
822      public boolean isConstructorParameter() {
823        boolean isConstructorParameter_value = getParent().Define_isConstructorParameter(this, null);
824    
825        return isConstructorParameter_value;
826      }
827      /**
828       * @attribute inh
829       * @aspect MultiCatch
830       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:46
831       */
832      /**
833       * @attribute inh
834       * @aspect MultiCatch
835       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:46
836       */
837      @ASTNodeAnnotation.Attribute
838      public boolean isExceptionHandlerParameter() {
839        boolean isExceptionHandlerParameter_value = getParent().Define_isExceptionHandlerParameter(this, null);
840    
841        return isExceptionHandlerParameter_value;
842      }
843      /**
844       * @attribute inh
845       * @aspect MultiCatch
846       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:71
847       */
848      /**
849       * @attribute inh
850       * @aspect MultiCatch
851       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:71
852       */
853      @ASTNodeAnnotation.Attribute
854      public TypeDecl hostType() {
855        TypeDecl hostType_value = getParent().Define_hostType(this, null);
856    
857        return hostType_value;
858      }
859      /**
860       * @attribute inh
861       * @aspect MultiCatch
862       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:167
863       */
864      /**
865       * @attribute inh
866       * @aspect MultiCatch
867       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:167
868       */
869      @ASTNodeAnnotation.Attribute
870      public LUBType lookupLUBType(Collection bounds) {
871        LUBType lookupLUBType_Collection_value = getParent().Define_lookupLUBType(this, null, bounds);
872    
873        return lookupLUBType_Collection_value;
874      }
875      /**
876       * @attribute inh
877       * @aspect MultiCatch
878       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:182
879       */
880      /**
881       * @attribute inh
882       * @aspect MultiCatch
883       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:182
884       */
885      @ASTNodeAnnotation.Attribute
886      public VariableScope outerScope() {
887        VariableScope outerScope_value = getParent().Define_outerScope(this, null);
888    
889        return outerScope_value;
890      }
891      /**
892       * @attribute inh
893       * @aspect MultiCatch
894       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:183
895       */
896      /**
897       * @attribute inh
898       * @aspect MultiCatch
899       * @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:183
900       */
901      @ASTNodeAnnotation.Attribute
902      public BodyDecl enclosingBodyDecl() {
903        BodyDecl enclosingBodyDecl_value = getParent().Define_enclosingBodyDecl(this, null);
904    
905        return enclosingBodyDecl_value;
906      }
907      /**
908       * @attribute inh
909       * @aspect PreciseRethrow
910       * @declaredat /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag:213
911       */
912      /**
913       * @attribute inh
914       * @aspect PreciseRethrow
915       * @declaredat /home/jesper/git/extendj/java7/frontend/PreciseRethrow.jrag:213
916       */
917      @ASTNodeAnnotation.Attribute
918      public CatchClause catchClause() {
919        CatchClause catchClause_value = getParent().Define_catchClause(this, null);
920    
921        return catchClause_value;
922      }
923      /**
924       * Local number used to store the exception parameter.
925       * @attribute inh
926       * @aspect MultiCatch
927       * @declaredat /home/jesper/git/extendj/java7/backend/MultiCatch.jrag:64
928       */
929      /**
930       * Local number used to store the exception parameter.
931       * @attribute inh
932       * @aspect MultiCatch
933       * @declaredat /home/jesper/git/extendj/java7/backend/MultiCatch.jrag:64
934       */
935      @ASTNodeAnnotation.Attribute
936      public int localNum() {
937        ASTNode$State state = state();
938        if (localNum_computed) {
939          return localNum_value;
940        }
941        boolean intermediate = state.INTERMEDIATE_VALUE;
942        state.INTERMEDIATE_VALUE = false;
943        int num = state.boundariesCrossed;
944        boolean isFinal = this.is$Final();
945        localNum_value = getParent().Define_localNum(this, null);
946        if (isFinal && num == state().boundariesCrossed) {
947          localNum_computed = true;
948        } else {
949        }
950        state.INTERMEDIATE_VALUE |= intermediate;
951    
952        return localNum_value;
953      }
954      /**
955       * @apilevel internal
956       */
957      protected boolean localNum_computed = false;
958      /**
959       * @apilevel internal
960       */
961      protected int localNum_value;
962      /**
963       * @apilevel internal
964       */
965      private void localNum_reset() {
966        localNum_computed = false;
967      }
968      /**
969       * @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:36
970       * @apilevel internal
971       */
972      public NameType Define_nameType(ASTNode caller, ASTNode child) {
973        if (caller == getTypeAccessListNoTransform()) {
974          // @declaredat /home/jesper/git/extendj/java7/frontend/MultiCatch.jrag:113
975          int i = caller.getIndexOfChild(child);
976          return NameType.TYPE_NAME;
977        }
978        else {
979          return getParent().Define_nameType(this, caller);
980        }
981      }
982      protected boolean canDefine_nameType(ASTNode caller, ASTNode child) {
983        return true;
984      }
985      /**
986       * @apilevel internal
987       */
988      public ASTNode rewriteTo() {
989        return super.rewriteTo();
990      }
991    }