public final class CfgCaseStatement extends CfgStatement
Constructor and Description |
---|
CfgCaseStatement(boolean defaultNode)
Constructs case statement of the specified default type.
|
CfgCaseStatement(java.util.Collection<ru.ispras.fortress.expression.NodeValue> values)
Constructs case statement with the specified values.
|
CfgCaseStatement(EventList events,
java.util.Collection<ru.ispras.fortress.expression.NodeValue> values)
Constructs the case statement with the specified parameters.
|
CfgCaseStatement(EventList events,
ru.ispras.fortress.expression.NodeValue value)
Constructs the case statement with the specified parameters.
|
CfgCaseStatement(ru.ispras.fortress.expression.NodeValue value)
Constructs case statement with the specified value.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ru.ispras.fortress.expression.NodeValue value)
Adds value to this case statement object.
|
Statement |
deepCopy()
Returns a copy of this statement and all it's sub-statements.
|
boolean |
equals(java.lang.Object object) |
CfgCaseData |
getCfgCaseData()
Returns the data descriptor for this statement.
|
java.lang.String |
getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
Returns a string description in the format of the specified printer.
|
EventList |
getEventList()
Returns event list.
|
CfgStatementType |
getType()
Returns statement type.
|
java.util.Set<ru.ispras.fortress.expression.NodeValue> |
getValues()
Returns case statement values.
|
boolean |
hasEvents()
Checks whether this object contains an event.
|
int |
hashCode() |
boolean |
isDefault()
Returns case statement default type.
|
void |
remove(ru.ispras.fortress.expression.NodeValue value)
Removes the specified value from this case statement.
|
void |
removeParent(Statement parent)
Removes link with the specified statement.
|
void |
removeValues()
Removes all values of this case statement.
|
void |
setDefault(boolean isDefault)
Sets default type of this case statement object.
|
void |
setParent(Statement parent)
Sets the specified statement as parent.
|
isSequential
add, add, addAll, apply, contains, containStatements, getDefines, getDescription, getId, getParent, getStatement, getStatementNum, getUses, indexOf, isType, remove, removeAll
addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo
public CfgCaseStatement(EventList events, ru.ispras.fortress.expression.NodeValue value)
events
- The events this statement is sensible to.value
- The case value.java.lang.IllegalArgumentException
- when both arguments are null
.public CfgCaseStatement(EventList events, java.util.Collection<ru.ispras.fortress.expression.NodeValue> values)
events
- The events this statement is sensible to.values
- The case values.java.lang.IllegalArgumentException
- when value argument is null
.public CfgCaseStatement(boolean defaultNode)
defaultNode
- default typepublic CfgCaseStatement(ru.ispras.fortress.expression.NodeValue value)
value
- case valuejava.lang.IllegalArgumentException
- when argument is null
.public CfgCaseStatement(java.util.Collection<ru.ispras.fortress.expression.NodeValue> values)
values
- case valuesjava.lang.IllegalArgumentException
- when argument is null
.RetrascopeRuntimeException
- when values are not of the same data type.public CfgCaseData getCfgCaseData()
public java.util.Set<ru.ispras.fortress.expression.NodeValue> getValues()
public boolean isDefault()
public void setDefault(boolean isDefault)
isDefault
- default typeRetrascopeRuntimeException
- when argument is true
and this statement already contains related NodeValue
valuespublic void add(ru.ispras.fortress.expression.NodeValue value)
value
- case valueRetrascopeRuntimeException
- when this object is of default kind.public void remove(ru.ispras.fortress.expression.NodeValue value)
value
- case valuepublic void removeValues()
public EventList getEventList()
public boolean hasEvents()
true
when this object containt an event,
false
otherwisepublic java.lang.String getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
Identifiable
printer
- Printer that provides an output string format.public CfgStatementType getType()
Statement
public Statement deepCopy()
Statement
public void setParent(Statement parent)
Statement
public void removeParent(Statement parent)
Statement
The specified statement should be a parent statement for this before this method.
removeParent
in class Statement
parent
- parent statement