public class AssignmentNode extends Node
variable = expression expression . field = expression expression [ index ] = expressionWe allow assignments without corresponding AST
Trees.
 Some desugarings create additional assignments to synthetic local variables. Such assignment nodes are marked as synthetic to allow special handling in transfer functions.
| Modifier and Type | Field and Description | 
|---|---|
| protected Node | lhsThe node for the LHS of the assignment tree. | 
| protected Node | rhsThe node for the RHS of the assignment tree. | 
| protected boolean | syntheticWhether the assignment node is synthetic | 
| protected Tree | treeThe underlying assignment tree. | 
| Constructor and Description | 
|---|
| AssignmentNode(Tree tree,
              Node target,
              Node expression)Create a (non-synthetic) AssignmentNode. | 
| AssignmentNode(Tree tree,
              Node target,
              Node expression,
              boolean synthetic)Create an AssignmentNode. | 
| Modifier and Type | Method and Description | 
|---|---|
| <R,P> R | accept(NodeVisitor<R,P> visitor,
      P p)Accept method of the visitor pattern. | 
| boolean | equals(@Nullable Object obj) | 
| Node | getExpression() | 
| Collection<Node> | getOperands() | 
| Node | getTarget()Returns the left-hand-side of the assignment. | 
| Tree | getTree()Returns the  Treein the abstract syntax tree, ornullif no corresponding
 tree exists. | 
| int | hashCode() | 
| boolean | isSynthetic()Check if the assignment node is synthetic, e.g. | 
| String | toString() | 
getBlock, getInSource, getTransitiveOperands, getType, getUid, isLValue, nodeCollectionToString, setBlock, setInSource, setLValue, toStringDebugprotected final Tree tree
protected final Node lhs
protected final Node rhs
protected final boolean synthetic
public AssignmentNode(Tree tree, Node target, Node expression)
tree - the AssignmentTree corresponding to the AssignmentNodetarget - the lhs of treeexpression - the rhs of treepublic AssignmentNode(Tree tree, Node target, Node expression, boolean synthetic)
tree - the AssignmentTree corresponding to the AssignmentNodetarget - the lhs of treeexpression - the rhs of treesynthetic - whether the assignment node is syntheticpublic Node getTarget()
public Node getExpression()
public Tree getTree()
NodeTree in the abstract syntax tree, or null if no corresponding
 tree exists. For instance, this is the case for an ImplicitThisNode.public boolean isSynthetic()
public <R,P> R accept(NodeVisitor<R,P> visitor, P p)
Nodepublic Collection<Node> getOperands()
NodegetOperands in class NodeNodes of this Node