org.extendj.ast.AssignExpr Maven / Gradle / Ivy
The newest version!
/* 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/java4/grammar/Java.ast:223
* @astdecl AssignExpr : Expr ::= Dest:Expr Source:Expr;
* @production AssignExpr : {@link Expr} ::= Dest:{@link Expr} Source:{@link Expr};
*/
public abstract class AssignExpr extends Expr implements Cloneable {
/**
* @aspect Java4PrettyPrint
* @declaredat /home/jesper/git/extendj/java4/frontend/PrettyPrint.jadd:81
*/
public void prettyPrint(PrettyPrinter out) {
out.print(getDest());
out.print(" ");
out.print(printOp());
out.print(" ");
out.print(getSource());
}
/**
* @aspect NodeConstructors
* @declaredat /home/jesper/git/extendj/java4/frontend/NodeConstructors.jrag:96
*/
public static Stmt asStmt(Expr left, Expr right) {
return new ExprStmt(new AssignSimpleExpr(left, right));
}
/**
* @aspect DefiniteAssignment
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:587
*/
protected boolean checkDUeverywhere(Variable v) {
if (getDest().isVariable() && getDest().varDecl() == v) {
if (!getSource().assignedAfter(v)) {
return false;
}
}
return super.checkDUeverywhere(v);
}
/**
* @aspect CreateBCode
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:432
*/
public void emitShiftExpr(CodeGeneration gen) {
TypeDecl dest = getDest().type();
TypeDecl source = getSource().type();
TypeDecl type = dest.unaryNumericPromotion();
getDest().createAssignLoadDest(gen);
dest.emitCastTo(gen, type);
getSource().createBCode(gen);
source.emitCastTo(gen, typeInt());
emitAssignOp(gen, type);
type.emitCastTo(gen, dest);
if (needsPush()) {
getDest().createPushAssignmentResult(gen);
}
getDest().emitStore(gen);
}
/** Select the typed operation for a compound assign expression.
* @aspect CreateBCode
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:545
*/
public void emitAssignOp(CodeGeneration gen, TypeDecl type) {
throw new Error("Operation emitAssignOp is not implemented for type " + getClass().getName());
}
/**
* @declaredat ASTNode:1
*/
public AssignExpr() {
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() {
children = new ASTNode[2];
}
/**
* @declaredat ASTNode:13
*/
@ASTNodeAnnotation.Constructor(
name = {"Dest", "Source"},
type = {"Expr", "Expr"},
kind = {"Child", "Child"}
)
public AssignExpr(Expr p0, Expr p1) {
setChild(p0, 0);
setChild(p1, 1);
}
/** @apilevel low-level
* @declaredat ASTNode:23
*/
protected int numChildren() {
return 2;
}
/**
* @apilevel internal
* @declaredat ASTNode:29
*/
public boolean mayHaveRewrite() {
return false;
}
/** @apilevel internal
* @declaredat ASTNode:33
*/
public void flushAttrCache() {
super.flushAttrCache();
type_reset();
unassignedAfter_Variable_reset();
unassignedAfterTrue_Variable_reset();
unassignedAfterFalse_Variable_reset();
}
/** @apilevel internal
* @declaredat ASTNode:41
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/** @apilevel internal
* @declaredat ASTNode:45
*/
public AssignExpr clone() throws CloneNotSupportedException {
AssignExpr node = (AssignExpr) 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:56
*/
@Deprecated
public abstract AssignExpr 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:64
*/
public abstract AssignExpr 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:72
*/
public abstract AssignExpr treeCopy();
/**
* Replaces the Dest child.
* @param node The new node to replace the Dest child.
* @apilevel high-level
*/
public void setDest(Expr node) {
setChild(node, 0);
}
/**
* Retrieves the Dest child.
* @return The current node used as the Dest child.
* @apilevel high-level
*/
@ASTNodeAnnotation.Child(name="Dest")
public Expr getDest() {
return (Expr) getChild(0);
}
/**
* Retrieves the Dest child.
* This method does not invoke AST transformations.
* @return The current node used as the Dest child.
* @apilevel low-level
*/
public Expr getDestNoTransform() {
return (Expr) getChildNoTransform(0);
}
/**
* Replaces the Source child.
* @param node The new node to replace the Source child.
* @apilevel high-level
*/
public void setSource(Expr node) {
setChild(node, 1);
}
/**
* Retrieves the Source child.
* @return The current node used as the Source child.
* @apilevel high-level
*/
@ASTNodeAnnotation.Child(name="Source")
public Expr getSource() {
return (Expr) getChild(1);
}
/**
* Retrieves the Source child.
* This method does not invoke AST transformations.
* @return The current node used as the Source child.
* @apilevel low-level
*/
public Expr getSourceNoTransform() {
return (Expr) getChildNoTransform(1);
}
/**
* @aspect AutoBoxingCodegen
* @declaredat /home/jesper/git/extendj/java5/backend/AutoBoxingCodegen.jrag:353
*/
public void createBCode(CodeGeneration gen) {
TypeDecl dest = getDest().type();
TypeDecl source = getSource().type();
TypeDecl type;
if (dest.isNumericType() && source.isNumericType()) {
type = dest.binaryNumericPromotion(source);
} else if (dest.isBoolean() && source.isBoolean()) {
type = dest.isReferenceType() ? dest.unboxed() : dest;
} else {
type = dest;
}
getDest().createAssignLoadDest(gen);
dest.emitCastTo(gen, type);
getSource().createBCode(gen);
getSource().emitCastTo(gen, type);
emitAssignOp(gen, type);
type.emitCastTo(gen, dest);
if (needsPush()) {
getDest().createPushAssignmentResult(gen);
}
getDest().emitStore(gen);
}
/** The operator string used for pretty printing this expression.
* @attribute syn
* @aspect PrettyPrintUtil
* @declaredat /home/jesper/git/extendj/java4/frontend/PrettyPrintUtil.jrag:375
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="PrettyPrintUtil", declaredAt="/home/jesper/git/extendj/java4/frontend/PrettyPrintUtil.jrag:375")
public abstract String printOp();
/** @apilevel internal */
private void type_reset() {
type_computed = null;
type_value = null;
}
/** @apilevel internal */
protected ASTState.Cycle type_computed = null;
/** @apilevel internal */
protected TypeDecl type_value;
/**
* @attribute syn
* @aspect TypeAnalysis
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:295
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeAnalysis", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeAnalysis.jrag:295")
public TypeDecl type() {
ASTState state = state();
if (type_computed == ASTState.NON_CYCLE || type_computed == state().cycle()) {
return type_value;
}
type_value = getDest().type();
if (state().inCircle()) {
type_computed = state().cycle();
} else {
type_computed = ASTState.NON_CYCLE;
}
return type_value;
}
/**
* @attribute syn
* @aspect DefiniteAssignment
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:268
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="DefiniteAssignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:268")
public boolean assignedAfter(Variable v) {
boolean assignedAfter_Variable_value = (getDest().isVariable() && getDest().varDecl() == v) || getSource().assignedAfter(v);
return assignedAfter_Variable_value;
}
/**
* @attribute syn
* @aspect DefiniteAssignment
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:375
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="DefiniteAssignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:375")
public boolean assignedAfterTrue(Variable v) {
boolean assignedAfterTrue_Variable_value = isFalse() || assignedAfter(v);
return assignedAfterTrue_Variable_value;
}
/**
* @attribute syn
* @aspect DefiniteAssignment
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:377
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="DefiniteAssignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:377")
public boolean assignedAfterFalse(Variable v) {
boolean assignedAfterFalse_Variable_value = isTrue() || assignedAfter(v);
return assignedAfterFalse_Variable_value;
}
/** @apilevel internal */
private void unassignedAfter_Variable_reset() {
unassignedAfter_Variable_values = null;
}
protected java.util.Map unassignedAfter_Variable_values;
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true)
@ASTNodeAnnotation.Source(aspect="DefiniteUnassignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:899")
public boolean unassignedAfter(Variable v) {
Object _parameters = v;
if (unassignedAfter_Variable_values == null) unassignedAfter_Variable_values = new java.util.HashMap(4);
ASTState.CircularValue _value;
if (unassignedAfter_Variable_values.containsKey(_parameters)) {
Object _cache = unassignedAfter_Variable_values.get(_parameters);
if (!(_cache instanceof ASTState.CircularValue)) {
return (Boolean) _cache;
} else {
_value = (ASTState.CircularValue) _cache;
}
} else {
_value = new ASTState.CircularValue();
unassignedAfter_Variable_values.put(_parameters, _value);
_value.value = true;
}
ASTState state = state();
if (!state.inCircle() || state.calledByLazyAttribute()) {
state.enterCircle();
boolean new_unassignedAfter_Variable_value;
do {
_value.cycle = state.nextCycle();
new_unassignedAfter_Variable_value = unassignedAfter_compute(v);
if (((Boolean)_value.value) != new_unassignedAfter_Variable_value) {
state.setChangeInCycle();
_value.value = new_unassignedAfter_Variable_value;
}
} while (state.testAndClearChangeInCycle());
unassignedAfter_Variable_values.put(_parameters, new_unassignedAfter_Variable_value);
state.leaveCircle();
return new_unassignedAfter_Variable_value;
} else if (_value.cycle != state.cycle()) {
_value.cycle = state.cycle();
boolean new_unassignedAfter_Variable_value = unassignedAfter_compute(v);
if (((Boolean)_value.value) != new_unassignedAfter_Variable_value) {
state.setChangeInCycle();
_value.value = new_unassignedAfter_Variable_value;
}
return new_unassignedAfter_Variable_value;
} else {
return (Boolean) _value.value;
}
}
/** @apilevel internal */
private boolean unassignedAfter_compute(Variable v) {
if (getDest().isVariable() && getDest().varDecl() == v) {
return false;
} else {
return getSource().unassignedAfter(v);
}
}
/** @apilevel internal */
private void unassignedAfterTrue_Variable_reset() {
unassignedAfterTrue_Variable_values = null;
}
protected java.util.Map unassignedAfterTrue_Variable_values;
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true)
@ASTNodeAnnotation.Source(aspect="DefiniteUnassignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:905")
public boolean unassignedAfterTrue(Variable v) {
Object _parameters = v;
if (unassignedAfterTrue_Variable_values == null) unassignedAfterTrue_Variable_values = new java.util.HashMap(4);
ASTState.CircularValue _value;
if (unassignedAfterTrue_Variable_values.containsKey(_parameters)) {
Object _cache = unassignedAfterTrue_Variable_values.get(_parameters);
if (!(_cache instanceof ASTState.CircularValue)) {
return (Boolean) _cache;
} else {
_value = (ASTState.CircularValue) _cache;
}
} else {
_value = new ASTState.CircularValue();
unassignedAfterTrue_Variable_values.put(_parameters, _value);
_value.value = true;
}
ASTState state = state();
if (!state.inCircle() || state.calledByLazyAttribute()) {
state.enterCircle();
boolean new_unassignedAfterTrue_Variable_value;
do {
_value.cycle = state.nextCycle();
new_unassignedAfterTrue_Variable_value = unassignedAfter(v);
if (((Boolean)_value.value) != new_unassignedAfterTrue_Variable_value) {
state.setChangeInCycle();
_value.value = new_unassignedAfterTrue_Variable_value;
}
} while (state.testAndClearChangeInCycle());
unassignedAfterTrue_Variable_values.put(_parameters, new_unassignedAfterTrue_Variable_value);
state.leaveCircle();
return new_unassignedAfterTrue_Variable_value;
} else if (_value.cycle != state.cycle()) {
_value.cycle = state.cycle();
boolean new_unassignedAfterTrue_Variable_value = unassignedAfter(v);
if (((Boolean)_value.value) != new_unassignedAfterTrue_Variable_value) {
state.setChangeInCycle();
_value.value = new_unassignedAfterTrue_Variable_value;
}
return new_unassignedAfterTrue_Variable_value;
} else {
return (Boolean) _value.value;
}
}
/** @apilevel internal */
private void unassignedAfterFalse_Variable_reset() {
unassignedAfterFalse_Variable_values = null;
}
protected java.util.Map unassignedAfterFalse_Variable_values;
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true)
@ASTNodeAnnotation.Source(aspect="DefiniteUnassignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:907")
public boolean unassignedAfterFalse(Variable v) {
Object _parameters = v;
if (unassignedAfterFalse_Variable_values == null) unassignedAfterFalse_Variable_values = new java.util.HashMap(4);
ASTState.CircularValue _value;
if (unassignedAfterFalse_Variable_values.containsKey(_parameters)) {
Object _cache = unassignedAfterFalse_Variable_values.get(_parameters);
if (!(_cache instanceof ASTState.CircularValue)) {
return (Boolean) _cache;
} else {
_value = (ASTState.CircularValue) _cache;
}
} else {
_value = new ASTState.CircularValue();
unassignedAfterFalse_Variable_values.put(_parameters, _value);
_value.value = true;
}
ASTState state = state();
if (!state.inCircle() || state.calledByLazyAttribute()) {
state.enterCircle();
boolean new_unassignedAfterFalse_Variable_value;
do {
_value.cycle = state.nextCycle();
new_unassignedAfterFalse_Variable_value = unassignedAfter(v);
if (((Boolean)_value.value) != new_unassignedAfterFalse_Variable_value) {
state.setChangeInCycle();
_value.value = new_unassignedAfterFalse_Variable_value;
}
} while (state.testAndClearChangeInCycle());
unassignedAfterFalse_Variable_values.put(_parameters, new_unassignedAfterFalse_Variable_value);
state.leaveCircle();
return new_unassignedAfterFalse_Variable_value;
} else if (_value.cycle != state.cycle()) {
_value.cycle = state.cycle();
boolean new_unassignedAfterFalse_Variable_value = unassignedAfter(v);
if (((Boolean)_value.value) != new_unassignedAfterFalse_Variable_value) {
state.setChangeInCycle();
_value.value = new_unassignedAfterFalse_Variable_value;
}
return new_unassignedAfterFalse_Variable_value;
} else {
return (Boolean) _value.value;
}
}
/**
* @attribute syn
* @aspect TypeCheck
* @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:80
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="TypeCheck", declaredAt="/home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:80")
public Collection typeProblems() {
{
Collection problems = new LinkedList();
if (!getDest().isVariable()) {
return Collections.singletonList((error("left hand side is not a variable")));
} else {
TypeDecl source = getSource().type();
TypeDecl dest = getDest().type();
if (getSource().type().isPrimitive() && getDest().type().isPrimitive()) {
return Collections.emptyList();
}
return Collections.singletonList(errorf("can not assign %s of type %s a value of type %s",
getDest().prettyPrint(), getDest().type().typeName(), getSource().type().typeName()));
}
}
}
/**
* @attribute syn
* @aspect CreateBCode
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:300
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="CreateBCode", declaredAt="/home/jesper/git/extendj/java4/backend/CreateBCode.jrag:300")
public boolean needsPop() {
boolean needsPop_value = getDest().isVarAccessWithAccessor();
return needsPop_value;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:36
* @apilevel internal
*/
public NameType Define_nameType(ASTNode _callerNode, ASTNode _childNode) {
if (getDestNoTransform() != null && _callerNode == getDest()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:122
return NameType.EXPRESSION_NAME;
}
else {
return getParent().Define_nameType(this, _callerNode);
}
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag:36
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute nameType
*/
protected boolean canDefine_nameType(ASTNode _callerNode, ASTNode _childNode) {
return true;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:34
* @apilevel internal
*/
public boolean Define_isDest(ASTNode _callerNode, ASTNode _childNode) {
if (getSourceNoTransform() != null && _callerNode == getSource()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:38
return false;
}
else if (getDestNoTransform() != null && _callerNode == getDest()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:37
return true;
}
else {
return getParent().Define_isDest(this, _callerNode);
}
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:34
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute isDest
*/
protected boolean canDefine_isDest(ASTNode _callerNode, ASTNode _childNode) {
return true;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:44
* @apilevel internal
*/
public boolean Define_isSource(ASTNode _callerNode, ASTNode _childNode) {
if (getSourceNoTransform() != null && _callerNode == getSource()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:48
return true;
}
else if (getDestNoTransform() != null && _callerNode == getDest()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:47
return true;
}
else {
return getParent().Define_isSource(this, _callerNode);
}
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:44
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute isSource
*/
protected boolean canDefine_isSource(ASTNode _callerNode, ASTNode _childNode) {
return true;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:256
* @apilevel internal
*/
public boolean Define_assignedBefore(ASTNode _callerNode, ASTNode _childNode, Variable v) {
if (getDestNoTransform() != null && _callerNode == getDest()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:476
return assignedBefore(v);
}
else if (getSourceNoTransform() != null && _callerNode == getSource()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:474
return getDest().assignedAfter(v);
}
else {
return getParent().Define_assignedBefore(this, _callerNode, v);
}
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:256
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute assignedBefore
*/
protected boolean canDefine_assignedBefore(ASTNode _callerNode, ASTNode _childNode, Variable v) {
return true;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:887
* @apilevel internal
*/
public boolean Define_unassignedBefore(ASTNode _callerNode, ASTNode _childNode, Variable v) {
if (getDestNoTransform() != null && _callerNode == getDest()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1080
return unassignedBefore(v);
}
else if (getSourceNoTransform() != null && _callerNode == getSource()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1078
return getDest().unassignedAfter(v);
}
else {
return getParent().Define_unassignedBefore(this, _callerNode, v);
}
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:887
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute unassignedBefore
*/
protected boolean canDefine_unassignedBefore(ASTNode _callerNode, ASTNode _childNode, Variable v) {
return true;
}
/** @apilevel internal */
public ASTNode rewriteTo() {
return super.rewriteTo();
}
/** @apilevel internal */
public boolean canRewrite() {
return false;
}
/** @apilevel internal */
protected void collect_contributors_CompilationUnit_problems(CompilationUnit _root, java.util.Map> _map) {
// @declaredat /home/jesper/git/extendj/java4/frontend/TypeCheck.jrag:78
{
java.util.Set contributors = _map.get(_root);
if (contributors == null) {
contributors = new java.util.LinkedHashSet();
_map.put((ASTNode) _root, contributors);
}
contributors.add(this);
}
super.collect_contributors_CompilationUnit_problems(_root, _map);
}
/** @apilevel internal */
protected void contributeTo_CompilationUnit_problems(LinkedList collection) {
super.contributeTo_CompilationUnit_problems(collection);
for (Problem value : typeProblems()) {
collection.add(value);
}
}
}