org.extendj.ast.SynchronizedStmt Maven / Gradle / Ivy
/* This file was generated with JastAdd2 (http://jastadd.org) version 2.3.0 */
package org.extendj.ast;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
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.*;
import java.util.zip.*;
import java.io.*;
import org.jastadd.util.PrettyPrintable;
import org.jastadd.util.PrettyPrinter;
import org.jastadd.util.*;
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.io.BufferedInputStream;
import java.io.DataInputStream;
/**
* @ast node
* @declaredat /home/jesper/git/extendj/java4/grammar/Java.ast:311
* @astdecl SynchronizedStmt : Stmt ::= Expr Block MonitorExit;
* @production SynchronizedStmt : {@link Stmt} ::= {@link Expr} {@link Block} {@link MonitorExit};
*/
public class SynchronizedStmt extends Stmt implements Cloneable, FinallyHost {
/**
* @aspect Java4PrettyPrint
* @declaredat /home/jesper/git/extendj/java4/frontend/PrettyPrint.jadd:579
*/
public void prettyPrint(PrettyPrinter out) {
out.print("synchronized (");
out.print(getExpr());
out.print(") ");
out.print(getBlock());
}
/**
* @aspect DefiniteUnassignment
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1236
*/
public Block getFinallyBlock() {
return getMonitorExit();
}
/**
* @aspect CreateBCode
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1867
*/
public void emitMonitorEnter(CodeGeneration gen) {
gen.DUP();
int num = localNum();
gen.ASTORE(num, VerificationTypes.OBJECT);
gen.MONITORENTER();
}
/**
* @aspect CreateBCode
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1881
*/
protected int monitorId = -1;
/**
* @aspect CreateBCode
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1883
*/
public void createBCode(CodeGeneration gen) {
int lbl_start = gen.constantPool().newLabel();
super.createBCode(gen);
getExpr().createBCode(gen);
monitorId = gen.monitorEnter(this);
gen.addLabel(lbl_start);
gen.monitorRangeStart(monitorId, lbl_start);
getBlock().createBCode(gen);
if (getBlock().canCompleteNormally()) {
getMonitorExit().createBCode(gen);
gen.GOTO(label_end());
}
gen.monitorExit();
gen.addLabel(label_end());
}
/**
* @declaredat ASTNode:1
*/
public SynchronizedStmt() {
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[3];
}
/**
* @declaredat ASTNode:13
*/
@ASTNodeAnnotation.Constructor(
name = {"Expr", "Block"},
type = {"Expr", "Block"},
kind = {"Child", "Child"}
)
public SynchronizedStmt(Expr p0, Block 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();
getMonitorExit_reset();
canCompleteNormally_reset();
assignedAfter_Variable_reset();
unassignedAfter_Variable_reset();
start_label_reset();
label_end_reset();
}
/** @apilevel internal
* @declaredat ASTNode:43
*/
public void flushCollectionCache() {
super.flushCollectionCache();
}
/** @apilevel internal
* @declaredat ASTNode:47
*/
public SynchronizedStmt clone() throws CloneNotSupportedException {
SynchronizedStmt node = (SynchronizedStmt) super.clone();
return node;
}
/** @apilevel internal
* @declaredat ASTNode:52
*/
public SynchronizedStmt copy() {
try {
SynchronizedStmt node = (SynchronizedStmt) clone();
node.parent = null;
if (children != null) {
node.children = (ASTNode[]) children.clone();
}
return node;
} catch (CloneNotSupportedException e) {
throw new Error("Error: clone not supported for " + getClass().getName());
}
}
/**
* 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:71
*/
@Deprecated
public SynchronizedStmt fullCopy() {
return treeCopyNoTransform();
}
/**
* 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:81
*/
public SynchronizedStmt treeCopyNoTransform() {
SynchronizedStmt tree = (SynchronizedStmt) copy();
if (children != null) {
for (int i = 0; i < children.length; ++i) {
switch (i) {
case 2:
tree.children[i] = null;
continue;
}
ASTNode child = (ASTNode) children[i];
if (child != null) {
child = child.treeCopyNoTransform();
tree.setChild(child, i);
}
}
}
return tree;
}
/**
* 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:106
*/
public SynchronizedStmt treeCopy() {
SynchronizedStmt tree = (SynchronizedStmt) copy();
if (children != null) {
for (int i = 0; i < children.length; ++i) {
switch (i) {
case 2:
tree.children[i] = null;
continue;
}
ASTNode child = (ASTNode) getChild(i);
if (child != null) {
child = child.treeCopy();
tree.setChild(child, i);
}
}
}
return tree;
}
/** @apilevel internal
* @declaredat ASTNode:125
*/
protected boolean is$Equal(ASTNode node) {
return super.is$Equal(node);
}
/**
* Replaces the Expr child.
* @param node The new node to replace the Expr child.
* @apilevel high-level
*/
public void setExpr(Expr node) {
setChild(node, 0);
}
/**
* Retrieves the Expr child.
* @return The current node used as the Expr child.
* @apilevel high-level
*/
@ASTNodeAnnotation.Child(name="Expr")
public Expr getExpr() {
return (Expr) getChild(0);
}
/**
* Retrieves the Expr child.
* This method does not invoke AST transformations.
* @return The current node used as the Expr child.
* @apilevel low-level
*/
public Expr getExprNoTransform() {
return (Expr) getChildNoTransform(0);
}
/**
* Replaces the Block child.
* @param node The new node to replace the Block child.
* @apilevel high-level
*/
public void setBlock(Block node) {
setChild(node, 1);
}
/**
* Retrieves the Block child.
* @return The current node used as the Block child.
* @apilevel high-level
*/
@ASTNodeAnnotation.Child(name="Block")
public Block getBlock() {
return (Block) getChild(1);
}
/**
* Retrieves the Block child.
* This method does not invoke AST transformations.
* @return The current node used as the Block child.
* @apilevel low-level
*/
public Block getBlockNoTransform() {
return (Block) getChildNoTransform(1);
}
/**
* Retrieves the MonitorExit child.
* This method does not invoke AST transformations.
* @return The current node used as the MonitorExit child.
* @apilevel low-level
*/
public MonitorExit getMonitorExitNoTransform() {
return (MonitorExit) getChildNoTransform(2);
}
/**
* Retrieves the child position of the optional child MonitorExit.
* @return The the child position of the optional child MonitorExit.
* @apilevel low-level
*/
protected int getMonitorExitChildPosition() {
return 2;
}
/** @apilevel internal */
private void getMonitorExit_reset() {
getMonitorExit_computed = false;
getMonitorExit_value = null;
}
/** @apilevel internal */
protected boolean getMonitorExit_computed = false;
/** @apilevel internal */
protected MonitorExit getMonitorExit_value;
/**
* @attribute syn nta
* @aspect MonitorExit
* @declaredat /home/jesper/git/extendj/java4/frontend/MonitorExit.jrag:32
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isNTA=true)
@ASTNodeAnnotation.Source(aspect="MonitorExit", declaredAt="/home/jesper/git/extendj/java4/frontend/MonitorExit.jrag:32")
public MonitorExit getMonitorExit() {
ASTState state = state();
if (getMonitorExit_computed) {
return (MonitorExit) getChild(getMonitorExitChildPosition());
}
state().enterLazyAttribute();
getMonitorExit_value = new MonitorExit(this);
setChild(getMonitorExit_value, getMonitorExitChildPosition());
getMonitorExit_computed = true;
state().leaveLazyAttribute();
MonitorExit node = (MonitorExit) this.getChild(getMonitorExitChildPosition());
return node;
}
/** @apilevel internal */
private void canCompleteNormally_reset() {
canCompleteNormally_computed = null;
}
/** @apilevel internal */
protected ASTState.Cycle canCompleteNormally_computed = null;
/** @apilevel internal */
protected boolean canCompleteNormally_value;
/**
* @attribute syn
* @aspect UnreachableStatements
* @declaredat /home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag:50
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="UnreachableStatements", declaredAt="/home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag:50")
public boolean canCompleteNormally() {
ASTState state = state();
if (canCompleteNormally_computed == ASTState.NON_CYCLE || canCompleteNormally_computed == state().cycle()) {
return canCompleteNormally_value;
}
canCompleteNormally_value = getBlock().canCompleteNormally();
if (state().inCircle()) {
canCompleteNormally_computed = state().cycle();
} else {
canCompleteNormally_computed = ASTState.NON_CYCLE;
}
return canCompleteNormally_value;
}
/** @apilevel internal */
private void assignedAfter_Variable_reset() {
assignedAfter_Variable_values = null;
}
protected java.util.Map assignedAfter_Variable_values;
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN, isCircular=true)
@ASTNodeAnnotation.Source(aspect="DefiniteAssignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:264")
public boolean assignedAfter(Variable v) {
Object _parameters = v;
if (assignedAfter_Variable_values == null) assignedAfter_Variable_values = new java.util.HashMap(4);
ASTState.CircularValue _value;
if (assignedAfter_Variable_values.containsKey(_parameters)) {
Object _cache = assignedAfter_Variable_values.get(_parameters);
if (!(_cache instanceof ASTState.CircularValue)) {
return (Boolean) _cache;
} else {
_value = (ASTState.CircularValue) _cache;
}
} else {
_value = new ASTState.CircularValue();
assignedAfter_Variable_values.put(_parameters, _value);
_value.value = true;
}
ASTState state = state();
if (!state.inCircle() || state.calledByLazyAttribute()) {
state.enterCircle();
boolean new_assignedAfter_Variable_value;
do {
_value.cycle = state.nextCycle();
new_assignedAfter_Variable_value = getBlock().assignedAfter(v);
if (((Boolean)_value.value) != new_assignedAfter_Variable_value) {
state.setChangeInCycle();
_value.value = new_assignedAfter_Variable_value;
}
} while (state.testAndClearChangeInCycle());
assignedAfter_Variable_values.put(_parameters, new_assignedAfter_Variable_value);
state.leaveCircle();
return new_assignedAfter_Variable_value;
} else if (_value.cycle != state.cycle()) {
_value.cycle = state.cycle();
boolean new_assignedAfter_Variable_value = getBlock().assignedAfter(v);
if (((Boolean)_value.value) != new_assignedAfter_Variable_value) {
state.setChangeInCycle();
_value.value = new_assignedAfter_Variable_value;
}
return new_assignedAfter_Variable_value;
} else {
return (Boolean) _value.value;
}
}
/**
* @attribute syn
* @aspect DefiniteUnassignment
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1243
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="DefiniteUnassignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1243")
public boolean unassignedAfterFinally(Variable v) {
boolean unassignedAfterFinally_Variable_value = true;
return unassignedAfterFinally_Variable_value;
}
/**
* @attribute syn
* @aspect DefiniteUnassignment
* @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1248
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="DefiniteUnassignment", declaredAt="/home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1248")
public boolean assignedAfterFinally(Variable v) {
boolean assignedAfterFinally_Variable_value = false;
return assignedAfterFinally_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:895")
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 = getBlock().unassignedAfter(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 = getBlock().unassignedAfter(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 void start_label_reset() {
start_label_computed = null;
}
/** @apilevel internal */
protected ASTState.Cycle start_label_computed = null;
/** @apilevel internal */
protected int start_label_value;
/**
* @attribute syn
* @aspect CreateBCode
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1708
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="CreateBCode", declaredAt="/home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1708")
public int start_label() {
ASTState state = state();
if (start_label_computed == ASTState.NON_CYCLE || start_label_computed == state().cycle()) {
return start_label_value;
}
start_label_value = hostType().constantPool().newLabel();
if (state().inCircle()) {
start_label_computed = state().cycle();
} else {
start_label_computed = ASTState.NON_CYCLE;
}
return start_label_value;
}
/** @apilevel internal */
private void label_end_reset() {
label_end_computed = null;
}
/** @apilevel internal */
protected ASTState.Cycle label_end_computed = null;
/** @apilevel internal */
protected int label_end_value;
/**
* @attribute syn
* @aspect NTAFinally
* @declaredat /home/jesper/git/extendj/java4/backend/NTAFinally.jrag:32
*/
@ASTNodeAnnotation.Attribute(kind=ASTNodeAnnotation.Kind.SYN)
@ASTNodeAnnotation.Source(aspect="NTAFinally", declaredAt="/home/jesper/git/extendj/java4/backend/NTAFinally.jrag:32")
public int label_end() {
ASTState state = state();
if (label_end_computed == ASTState.NON_CYCLE || label_end_computed == state().cycle()) {
return label_end_value;
}
label_end_value = hostType().constantPool().newLabel();
if (state().inCircle()) {
label_end_computed = state().cycle();
} else {
label_end_computed = ASTState.NON_CYCLE;
}
return label_end_value;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag:49
* @apilevel internal
*/
public boolean Define_reachable(ASTNode _callerNode, ASTNode _childNode) {
if (getBlockNoTransform() != null && _callerNode == getBlock()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag:165
return reachable();
}
else {
return getParent().Define_reachable(this, _callerNode);
}
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag:49
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute reachable
*/
protected boolean canDefine_reachable(ASTNode _callerNode, ASTNode _childNode) {
return true;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag:207
* @apilevel internal
*/
public boolean Define_reportUnreachable(ASTNode _callerNode, ASTNode _childNode) {
if (getBlockNoTransform() != null && _callerNode == getBlock()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag:217
return reachable();
}
else {
return getParent().Define_reportUnreachable(this, _callerNode);
}
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/UnreachableStatements.jrag:207
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute reportUnreachable
*/
protected boolean canDefine_reportUnreachable(ASTNode _callerNode, ASTNode _childNode) {
return true;
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/BranchTarget.jrag:273
* @apilevel internal
*/
public FinallyHost Define_enclosingFinally(ASTNode _callerNode, ASTNode _childNode, Stmt branch) {
if (getMonitorExitNoTransform() != null && _callerNode == getMonitorExit()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/BranchTarget.jrag:284
return enclosingFinally(branch);
}
else {
int childIndex = this.getIndexOfChild(_callerNode);
return this;
}
}
/**
* @declaredat /home/jesper/git/extendj/java4/frontend/BranchTarget.jrag:273
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute enclosingFinally
*/
protected boolean canDefine_enclosingFinally(ASTNode _callerNode, ASTNode _childNode, Stmt branch) {
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 (getBlockNoTransform() != null && _callerNode == getBlock()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:845
return getExpr().assignedAfter(v);
}
else if (getExprNoTransform() != null && _callerNode == getExpr()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:843
return assignedBefore(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 (getBlockNoTransform() != null && _callerNode == getBlock()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1568
return getExpr().unassignedAfter(v);
}
else if (getExprNoTransform() != null && _callerNode == getExpr()) {
// @declaredat /home/jesper/git/extendj/java4/frontend/DefiniteAssignment.jrag:1566
return unassignedBefore(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;
}
/**
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1908
* @apilevel internal
*/
public boolean Define_leavesMonitor(ASTNode _callerNode, ASTNode _childNode, Stmt branch, SynchronizedStmt monitor) {
int childIndex = this.getIndexOfChild(_callerNode);
{
if (monitor == this) {
return true;
} else {
return leavesMonitor(branch, monitor);
}
}
}
/**
* @declaredat /home/jesper/git/extendj/java4/backend/CreateBCode.jrag:1908
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute leavesMonitor
*/
protected boolean canDefine_leavesMonitor(ASTNode _callerNode, ASTNode _childNode, Stmt branch, SynchronizedStmt monitor) {
return true;
}
/**
* @declaredat /home/jesper/git/extendj/java4/backend/LocalNum.jrag:63
* @apilevel internal
*/
public int Define_localNum(ASTNode _callerNode, ASTNode _childNode) {
if (getBlockNoTransform() != null && _callerNode == getBlock()) {
// @declaredat /home/jesper/git/extendj/java4/backend/LocalNum.jrag:196
return localNum() + 3;
}
else {
return getParent().Define_localNum(this, _callerNode);
}
}
/**
* @declaredat /home/jesper/git/extendj/java4/backend/LocalNum.jrag:63
* @apilevel internal
* @return {@code true} if this node has an equation for the inherited attribute localNum
*/
protected boolean canDefine_localNum(ASTNode _callerNode, ASTNode _childNode) {
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:486
if (!getExpr().type().isReferenceType() || getExpr().type().isNull()) {
{
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);
if (!getExpr().type().isReferenceType() || getExpr().type().isNull()) {
collection.add(error("*** The type of the expression must be a reference"));
}
}
}