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/java8/grammar/Lambda.ast:3
027     * @production LambdaParameters : {@link ASTNode};
028    
029     */
030    public abstract class LambdaParameters extends ASTNode<ASTNode> implements Cloneable {
031      /**
032       * @declaredat ASTNode:1
033       */
034      public LambdaParameters() {
035        super();
036      }
037      /**
038       * Initializes the child array to the correct size.
039       * Initializes List and Opt nta children.
040       * @apilevel internal
041       * @ast method
042       * @declaredat ASTNode:10
043       */
044      public void init$Children() {
045      }
046      /**
047       * @apilevel low-level
048       * @declaredat ASTNode:15
049       */
050      protected int numChildren() {
051        return 0;
052      }
053      /**
054       * @apilevel internal
055       * @declaredat ASTNode:21
056       */
057      public boolean mayHaveRewrite() {
058        return false;
059      }
060      /**
061       * @apilevel internal
062       * @declaredat ASTNode:27
063       */
064      public void flushAttrCache() {
065        super.flushAttrCache();
066        enclosingLambda_reset();
067      }
068      /**
069       * @apilevel internal
070       * @declaredat ASTNode:34
071       */
072      public void flushCollectionCache() {
073        super.flushCollectionCache();
074      }
075      /**
076       * @apilevel internal
077       * @declaredat ASTNode:40
078       */
079      public void flushRewriteCache() {
080        super.flushRewriteCache();
081      }
082      /**
083       * @apilevel internal
084       * @declaredat ASTNode:46
085       */
086      public LambdaParameters clone() throws CloneNotSupportedException {
087        LambdaParameters node = (LambdaParameters) super.clone();
088        return node;
089      }
090      /**
091       * Create a deep copy of the AST subtree at this node.
092       * The copy is dangling, i.e. has no parent.
093       * @return dangling copy of the subtree at this node
094       * @apilevel low-level
095       * @deprecated Please use treeCopy or treeCopyNoTransform instead
096       * @declaredat ASTNode:57
097       */
098      @Deprecated
099      public abstract LambdaParameters fullCopy();
100      /**
101       * Create a deep copy of the AST subtree at this node.
102       * The copy is dangling, i.e. has no parent.
103       * @return dangling copy of the subtree at this node
104       * @apilevel low-level
105       * @declaredat ASTNode:65
106       */
107      public abstract LambdaParameters treeCopyNoTransform();
108      /**
109       * Create a deep copy of the AST subtree at this node.
110       * The subtree of this node is traversed to trigger rewrites before copy.
111       * The copy is dangling, i.e. has no parent.
112       * @return dangling copy of the subtree at this node
113       * @apilevel low-level
114       * @declaredat ASTNode:73
115       */
116      public abstract LambdaParameters treeCopy();
117      /**
118       * @attribute syn
119       * @aspect LambdaExpr
120       * @declaredat /home/jesper/git/extendj/java8/frontend/LambdaExpr.jrag:42
121       */
122      @ASTNodeAnnotation.Attribute
123      public abstract int numParameters();
124      /**
125       * @attribute syn
126       * @aspect LambdaExpr
127       * @declaredat /home/jesper/git/extendj/java8/frontend/LambdaExpr.jrag:48
128       */
129      @ASTNodeAnnotation.Attribute
130      public abstract boolean congruentTo(FunctionDescriptor f);
131      /**
132       * @attribute syn
133       * @aspect LambdaToClass
134       * @declaredat /home/jesper/git/extendj/java8/backend/LambdaToClass.jrag:106
135       */
136      @ASTNodeAnnotation.Attribute
137      public abstract List<ParameterDeclaration> toParameterList();
138      /**
139       * @attribute inh
140       * @aspect PreciseRethrow
141       * @declaredat /home/jesper/git/extendj/java8/frontend/EffectivelyFinal.jrag:31
142       */
143      /**
144       * @attribute inh
145       * @aspect PreciseRethrow
146       * @declaredat /home/jesper/git/extendj/java8/frontend/EffectivelyFinal.jrag:31
147       */
148      @ASTNodeAnnotation.Attribute
149      public boolean inhModifiedInScope(Variable var) {
150        boolean inhModifiedInScope_Variable_value = getParent().Define_inhModifiedInScope(this, null, var);
151    
152        return inhModifiedInScope_Variable_value;
153      }
154      /**
155       * @attribute inh
156       * @aspect EnclosingLambda
157       * @declaredat /home/jesper/git/extendj/java8/frontend/EnclosingLambda.jrag:30
158       */
159      /**
160       * @attribute inh
161       * @aspect EnclosingLambda
162       * @declaredat /home/jesper/git/extendj/java8/frontend/EnclosingLambda.jrag:30
163       */
164      @ASTNodeAnnotation.Attribute
165      public LambdaExpr enclosingLambda() {
166        ASTNode$State state = state();
167        if (enclosingLambda_computed) {
168          return enclosingLambda_value;
169        }
170        boolean intermediate = state.INTERMEDIATE_VALUE;
171        state.INTERMEDIATE_VALUE = false;
172        int num = state.boundariesCrossed;
173        boolean isFinal = this.is$Final();
174        enclosingLambda_value = getParent().Define_enclosingLambda(this, null);
175        if (isFinal && num == state().boundariesCrossed) {
176          enclosingLambda_computed = true;
177        } else {
178        }
179        state.INTERMEDIATE_VALUE |= intermediate;
180    
181        return enclosingLambda_value;
182      }
183      /**
184       * @apilevel internal
185       */
186      protected boolean enclosingLambda_computed = false;
187      /**
188       * @apilevel internal
189       */
190      protected LambdaExpr enclosingLambda_value;
191      /**
192       * @apilevel internal
193       */
194      private void enclosingLambda_reset() {
195        enclosingLambda_computed = false;
196        enclosingLambda_value = null;
197      }
198      /**
199       * @attribute inh
200       * @aspect Java8NameCheck
201       * @declaredat /home/jesper/git/extendj/java8/frontend/NameCheck.jrag:31
202       */
203      /**
204       * @attribute inh
205       * @aspect Java8NameCheck
206       * @declaredat /home/jesper/git/extendj/java8/frontend/NameCheck.jrag:31
207       */
208      @ASTNodeAnnotation.Attribute
209      public VariableScope outerScope() {
210        VariableScope outerScope_value = getParent().Define_outerScope(this, null);
211    
212        return outerScope_value;
213      }
214      /**
215       * @attribute inh
216       * @aspect TypeCheck
217       * @declaredat /home/jesper/git/extendj/java8/frontend/TypeCheck.jrag:29
218       */
219      /**
220       * @attribute inh
221       * @aspect TypeCheck
222       * @declaredat /home/jesper/git/extendj/java8/frontend/TypeCheck.jrag:29
223       */
224      @ASTNodeAnnotation.Attribute
225      public TypeDecl unknownType() {
226        TypeDecl unknownType_value = getParent().Define_unknownType(this, null);
227    
228        return unknownType_value;
229      }
230      /**
231       * @apilevel internal
232       */
233      public ASTNode rewriteTo() {
234        return super.rewriteTo();
235      }
236    }