public class FieldAssign_c extends Assign_c implements FieldAssign
FieldAssign
represents a Java assignment expression to
a field. For instance, this.x = e
.
The class of the Expr
returned by
FieldAssign_c.left()
is guaranteed to be a Field
.Assign.Operator
Term.Instance
exceptions, reachable
ADD_ASSIGN, ASSIGN, BIT_AND_ASSIGN, BIT_OR_ASSIGN, BIT_XOR_ASSIGN, DIV_ASSIGN, MOD_ASSIGN, MUL_ASSIGN, SHL_ASSIGN, SHR_ASSIGN, SUB_ASSIGN, USHR_ASSIGN
Constructor and Description |
---|
FieldAssign_c(Position pos,
Field left,
Assign.Operator op,
Expr right) |
FieldAssign_c(Position pos,
Field left,
Assign.Operator op,
Expr right,
Ext ext) |
Modifier and Type | Method and Description |
---|---|
protected void |
acceptCFGAssign(CFGBuilder<?> v)
Construct a CFG for this assignment when the assignment operator
is ASSIGN (i.e., the normal, simple assignment =).
|
protected void |
acceptCFGOpAssign(CFGBuilder<?> v)
Construct a CFG for this assignment when the assignment operator
is of the form op= for some operation op.
|
Node |
extRewrite(ExtensionRewriter rw)
Rewrite the AST for the compilation in this language.
|
NodeVisitor |
extRewriteEnter(ExtensionRewriter rw)
Rewrite the AST for the compilation in this language.
|
Term |
firstChild()
Return the first direct subterm performed when evaluating this term.
|
Field |
left()
Left child (target) of the assignment.
|
Assign |
left(Expr left)
Set the left child (target) of the assignment.
|
java.util.List<Type> |
throwTypes(TypeSystem ts)
List of Types of exceptions that might get thrown.
|
acceptCFG, childExpectedType, copy, dump, left, operator, operator, operator, precedence, prettyPrint, reconstruct, right, right, right, throwsArithmeticException, toString, typeCheck, visitChildren
booleanValue, buildTypes, byteValue, charValue, constantValue, constantValue, constantValueSet, constantValueSet, doubleValue, floatValue, intValue, isConstant, isConstant, isTypeChecked, lastLang, longValue, printSubExpr, printSubExpr, shortValue, stringValue, type, type, type
exceptionCheck, exceptions, exceptions, exceptions, listChild, reachable, reachable, reachable
addDecls, buildTypesEnter, checkConstants, copy, copy, copyIfNeeded, del, del, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, error, error, error, exceptionCheckEnter, ext, ext, ext, ext, isDisambiguated, lang, position, position, position, prettyPrint, prettyPrint, prettyPrint, prettyPrint, print, printBlock, printSubStmt, translate, typeCheckEnter, typeCheckOverride, visit, visitChild, visitEdge, visitList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
operator, operator, right, right, throwsArithmeticException
constantValue, constantValueSet, isConstant, precedence, printSubExpr, printSubExpr, type
del, del, dump, error, error, ext, ext, ext, ext, isDisambiguated, isTypeChecked, position, position, visit, visitEdge
addDecls, buildTypes, buildTypesEnter, checkConstants, childExpectedType, copy, copy, disambiguate, disambiguateEnter, disambiguateOverride, dump, dump, dump, dump, enterChildScope, enterScope, exceptionCheck, exceptionCheckEnter, lang, prettyPrint, prettyPrint, prettyPrint, prettyPrint, prettyPrint, translate, typeCheck, typeCheckEnter, typeCheckOverride, visitChild, visitChildren, visitList
exceptions, exceptions, reachable, reachable
public FieldAssign_c(Position pos, Field left, Assign.Operator op, Expr right)
public FieldAssign_c(Position pos, Field left, Assign.Operator op, Expr right, Ext ext)
public Field left()
Assign
public Assign left(Expr left)
Assign
public Term firstChild()
TermOps
firstChild
in interface TermOps
firstChild
in class Assign_c
protected void acceptCFGAssign(CFGBuilder<?> v)
Assign_c
acceptCFGAssign
in class Assign_c
protected void acceptCFGOpAssign(CFGBuilder<?> v)
Assign_c
acceptCFGOpAssign
in class Assign_c
public java.util.List<Type> throwTypes(TypeSystem ts)
NodeOps
throwTypes
in interface NodeOps
throwTypes
in class Assign_c
public NodeVisitor extRewriteEnter(ExtensionRewriter rw) throws SemanticException
NodeOps
enter()
method of the
visitor. The method should perform work that should be done
before visiting the children of the node. The method may return
this
or a new copy of the node on which
visitChildren()
and leave()
will be
invoked.extRewriteEnter
in interface NodeOps
extRewriteEnter
in class Node_c
rw
- The visitor.SemanticException
public Node extRewrite(ExtensionRewriter rw) throws SemanticException
NodeOps
leave()
method of the
visitor. The method should perform work that should be done
after visiting the children of the node. The method may return
this
or a new copy of the node which will be
installed as a child of the node's parent.extRewrite
in interface NodeOps
extRewrite
in class Expr_c
rw
- The visitor.SemanticException