public class Assignment extends MetaInfo implements UseDef
Constructor and Description |
---|
Assignment()
The default constructor.
|
Assignment(ru.ispras.fortress.expression.NodeVariable var,
ru.ispras.fortress.expression.Node expr)
Constructs object with the specified non-ranged variable and expression.
|
Assignment(RangedVariable variable,
ru.ispras.fortress.expression.Node expr)
Constructs object with the specified ranged variable and expression.
|
Modifier and Type | Method and Description |
---|---|
Assignment |
deepcopy()
Creates a deep copy of the current object.
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getDefines()
Returns a set of defined variables.
|
java.lang.String |
getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer,
java.lang.String separator)
Returns a
String description of object
stored in format of the specified printer. |
ru.ispras.fortress.expression.Node |
getExpression()
Returns value expression.
|
RangedVariable |
getRangedVariable()
Returns variables that are to be assigned to.
|
java.util.Set<java.lang.String> |
getUsedVariableNames()
Returns names of variables used in this assignment.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getUses()
Returns a set of used variables.
|
int |
hashCode() |
void |
setExpression(ru.ispras.fortress.expression.Node expression)
Sets new value expression.
|
void |
setVariable(RangedVariable variable)
Sets the specified variable as objects' target.
|
java.lang.String |
toString() |
addMetaInfo, addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo, removeMetaInfo, removeMetaInfo
public Assignment()
public Assignment(RangedVariable variable, ru.ispras.fortress.expression.Node expr)
variable
- variableexpr
- syntax nodejava.lang.NullPointerException
- when any of arguments is null
.public Assignment(ru.ispras.fortress.expression.NodeVariable var, ru.ispras.fortress.expression.Node expr)
var
- variable which expression is assignedexpr
- expression to be assignedjava.lang.NullPointerException
- when any of arguments is null
.public Assignment deepcopy()
public RangedVariable getRangedVariable()
public void setVariable(RangedVariable variable)
variable
- variable to be addedjava.lang.NullPointerException
- when argument is null
.public ru.ispras.fortress.expression.Node getExpression()
public void setExpression(ru.ispras.fortress.expression.Node expression)
expression
- new value expression syntax nodejava.lang.NullPointerException
- when argument is null
.public java.util.Set<java.lang.String> getUsedVariableNames()
public java.lang.String getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer, java.lang.String separator)
String
description of object
stored in format of the specified printer.printer
- expression printerseparator
- assignment separator between defined and used variablesjava.lang.NullPointerException
- when any of the arguments is null
.public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getUses()
UseDef
public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getDefines()
UseDef
getDefines
in interface UseDef
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object