org.extendj.ast.LambdaParameters Maven / Gradle / Ivy
/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.0 */
package org.extendj.ast;
import java.util.ArrayList;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.IOException;
import java.util.Set;
import beaver.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.LinkedHashSet;
import java.util.*;
import org.jastadd.util.PrettyPrintable;
import org.jastadd.util.PrettyPrinter;
import java.util.zip.*;
import java.io.*;
import org.jastadd.util.*;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
/**
* @ast node
* @declaredat /home/jesper/git/extendj/java8/grammar/Lambda.ast:3
* @astdecl LambdaParameters : ASTNode;
* @production LambdaParameters : {@link ASTNode};
*/
public abstract class LambdaParameters extends ASTNode implements Cloneable {
/**
* Builds a parameter list copying the lambda parameters.
* @aspect LambdaToClass
* @declaredat /home/jesper/git/extendj/java8/frontend/LambdaAnonymousDecl.jrag:115
*/
protected abstract List toParameterList();
/**
* @declaredat ASTNode:1
*/
public LambdaParameters() {
super();
}
/**
* Initializes the child array to the correct size.
* Initializes List and Opt nta children.
* @apilevel internal
* @ast method
* @declaredat ASTNode:10
*/
public void init$Children() {
}
/** @apilevel low-level
* @declaredat ASTNode:13
*/
protected int numChildren() {
return 0;
}
/**
* @apilevel internal
* @declaredat ASTNode:19
*/
public boolean mayHaveRewrite() {
return false;
}
/** @apilevel internal
* @declaredat ASTNode:23
*/
public void flushAttrCache() {
super.flushAttrCache();
enclosingLambda_reset();
}
/** @apilevel internal
* @declaredat ASTNode:28
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/** @apilevel internal
* @declaredat ASTNode:32
*/
public LambdaParameters clone() throws CloneNotSupportedException {
LambdaParameters node = (LambdaParameters) super.clone();
return node;
}
/**
* Create a deep copy of the AST subtree at this node.
* The copy is dangling, i.e. has no parent.
* @return dangling copy of the subtree at this node
* @apilevel low-level
* @deprecated Please use treeCopy or treeCopyNoTransform instead
* @declaredat ASTNode:43
*/
@Deprecated
public abstract LambdaParameters fullCopy();
/**
* Create a deep copy of the AST subtree at this node.
* The copy is dangling, i.e. has no parent.
* @return dangling copy of the subtree at this node
* @apilevel low-level
* @declaredat ASTNode:51
*/
public abstract LambdaParameters treeCopyNoTransform();
/**
* Create a deep copy of the AST subtree at this node.
* The subtree of this node is traversed to trigger rewrites before copy.
* The copy is dangling, i.e. has no parent.
* @return dangling copy of the subtree at this node
* @apilevel low-level
* @declaredat ASTNode:59
*/
public abstract LambdaParameters treeCopy();
/**
* @attribute syn
* @aspect LambdaExpr
* @declaredat /home/jesper/git/extendj/java8/frontend/LambdaExpr.jrag:47
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="LambdaExpr", declaredAt="/home/jesper/git/extendj/java8/frontend/LambdaExpr.jrag:47")
public abstract int numParameters();
/**
* @attribute syn
* @aspect LambdaExpr
* @declaredat /home/jesper/git/extendj/java8/frontend/LambdaExpr.jrag:53
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="LambdaExpr", declaredAt="/home/jesper/git/extendj/java8/frontend/LambdaExpr.jrag:53")
public abstract boolean congruentTo(FunctionDescriptor fd);
/**
* @attribute inh
* @aspect PreciseRethrow
* @declaredat /home/jesper/git/extendj/java8/frontend/EffectivelyFinal.jrag:31
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH)
@ASTNodeAnnotation.Source(aspect="PreciseRethrow", declaredAt="/home/jesper/git/extendj/java8/frontend/EffectivelyFinal.jrag:31")
public boolean inhModifiedInScope(Variable var) {
boolean inhModifiedInScope_Variable_value = getParent().Define_inhModifiedInScope(this, null, var);
return inhModifiedInScope_Variable_value;
}
/**
* @attribute inh
* @aspect EnclosingLambda
* @declaredat /home/jesper/git/extendj/java8/frontend/EnclosingLambda.jrag:30
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH)
@ASTNodeAnnotation.Source(aspect="EnclosingLambda", declaredAt="/home/jesper/git/extendj/java8/frontend/EnclosingLambda.jrag:30")
public LambdaExpr enclosingLambda() {
ASTState state = state();
if (enclosingLambda_computed == ASTState.NON_CYCLE || enclosingLambda_computed == state().cycle()) {
return enclosingLambda_value;
}
enclosingLambda_value = getParent().Define_enclosingLambda(this, null);
if (state().inCircle()) {
enclosingLambda_computed = state().cycle();
} else {
enclosingLambda_computed = ASTState.NON_CYCLE;
}
return enclosingLambda_value;
}
/** @apilevel internal */
private void enclosingLambda_reset() {
enclosingLambda_computed = null;
enclosingLambda_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle enclosingLambda_computed = null;
/** @apilevel internal */
protected LambdaExpr enclosingLambda_value;
/**
* @attribute inh
* @aspect Java8NameCheck
* @declaredat /home/jesper/git/extendj/java8/frontend/NameCheck.jrag:32
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH)
@ASTNodeAnnotation.Source(aspect="Java8NameCheck", declaredAt="/home/jesper/git/extendj/java8/frontend/NameCheck.jrag:32")
public VariableScope outerScope() {
VariableScope outerScope_value = getParent().Define_outerScope(this, null);
return outerScope_value;
}
/**
* @attribute inh
* @aspect TypeCheck
* @declaredat /home/jesper/git/extendj/java8/frontend/TypeCheck.jrag:30
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.INH)
@ASTNodeAnnotation.Source(aspect="TypeCheck", declaredAt="/home/jesper/git/extendj/java8/frontend/TypeCheck.jrag:30")
public TypeDecl unknownType() {
TypeDecl unknownType_value = getParent().Define_unknownType(this, null);
return unknownType_value;
}
/** @apilevel internal */
public ASTNode rewriteTo() {
return super.rewriteTo();
}
/** @apilevel internal */
public boolean canRewrite() {
return false;
}
}