public final class CfgSwitchStatement extends CfgConditionStatement
Constructor and Description |
---|
CfgSwitchStatement(ru.ispras.fortress.expression.Node condition)
Constructs an object with the specified condition.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Statement statement)
Adds the specified statement as child to this object.
|
void |
addAll(java.util.Collection<Statement> statements)
Adds all the statements from the specified list as children.
|
Statement |
deepCopy()
Returns a copy of this statement and all it's sub-statements.
|
CfgStatementType |
getType()
Returns statement type.
|
boolean |
isSequential()
Checks whether statement is of sequential kind.
|
void |
remove(Statement statement)
Removes the specified statement from children.
|
void |
setCondition(ru.ispras.fortress.expression.Node expr)
Sets new
Node condition. |
apply, equals, getCondition, getDescription, getUses, hasCondition, hashCode
add, contains, containStatements, getDefines, getDescription, getId, getParent, getStatement, getStatementNum, indexOf, isType, removeAll, removeParent, setParent
addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo
public CfgSwitchStatement(ru.ispras.fortress.expression.Node condition)
condition
- Switch condition.public boolean isSequential()
Statement
isSequential
in class SequentialStatement
true
if it's sub-statements are treated as sequential,
false
otherwise.public void setCondition(ru.ispras.fortress.expression.Node expr)
Node
condition.expr
- expressionjava.lang.IllegalArgumentException
- when argument is either null
or not of the same DataType
data type
that its children CfgCaseStatement
nodes have.public CfgStatementType getType()
Statement
public Statement deepCopy()
Statement
public void add(Statement statement)
Statement
public void remove(Statement statement)
Statement