public abstract class CfgNode extends MetaInfo implements CfgModelNode, UseDef
Node of control flow graph of some Process
node.
Has only one parent node and only one child node.
Modifier and Type | Field and Description |
---|---|
protected CfgNode |
childNode |
protected CfgNode |
parentNode |
Constructor and Description |
---|
CfgNode() |
Modifier and Type | Method and Description |
---|---|
void |
addChild(CfgModelNode node)
Adds child node.
|
void |
addParent(CfgModelNode node)
Adds parent node.
|
boolean |
equals(java.lang.Object obj) |
java.util.Collection<CfgModelNode> |
getChildren()
Return child nodes.
|
java.lang.String |
getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
Returns node string description in the format of the specified printer.
|
java.lang.String |
getId()
Returns unique node identifier in string form.
|
java.util.Collection<CfgModelNode> |
getParents()
Returns parent nodes.
|
boolean |
hasChildren()
Checks rather node has child nodes.
|
int |
hashCode() |
boolean |
hasParents()
Checks rather node has parent nodes.
|
void |
removeChild(CfgModelNode node)
Removes child node.
|
void |
removeParent(CfgModelNode node)
Removes parent node.
|
addMetaInfo, addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo, removeMetaInfo
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
deepCopy, getOnlyChild, getOnlyParent, getType, hasOnlyChild, hasOnlyParent
getDefines, getUses
public java.lang.String getId()
CfgModelNode
getId
in interface CfgModelNode
public java.lang.String getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
CfgModelNode
getDescription
in interface CfgModelNode
printer
- printerpublic boolean hasParents()
CfgModelNode
hasParents
in interface CfgModelNode
true
if node has at least one parent, false
otherwise.public boolean hasChildren()
CfgModelNode
hasChildren
in interface CfgModelNode
true
if node has at least one child, false
otherwise.public void addChild(CfgModelNode node)
The specified node will be added only when it is CfgNode
and this object does not have such child node.
addChild
in interface CfgModelNode
node
- child nodejava.lang.IllegalArgumentException
- in the following situations:
(1) when argument is null
;
(2) when the specified node
is not of CfgNode
type.java.lang.IllegalStateException
- when this object already
has non-null child node.public void addParent(CfgModelNode node)
The specified node will be added only when it is CfgNode
and this object has not such parent node.
addParent
in interface CfgModelNode
node
- parent nodejava.lang.IllegalArgumentException
- in the following situations:
(1) when argument is null
;
(2) when the specified node
is not of CfgNode
type.java.lang.IllegalStateException
- when this object
already has non-null parent node.public void removeChild(CfgModelNode node)
The specified node will be removed only when it is CfgNode
and this object has such child node.
removeChild
in interface CfgModelNode
node
- child nodejava.lang.IllegalArgumentException
- in the following situations:
(1) when argument is null
;
(2) when the specified node
is not of CfgNode
type.java.lang.IllegalStateException
- when this object
does not have such child node.public void removeParent(CfgModelNode node)
The specified node will be removed only when it is CfgNode
and this object has such parent node.
removeParent
in interface CfgModelNode
node
- parent nodejava.lang.IllegalArgumentException
- in the following situations:
(1) when argument is null
;
(2) when the specified node
is not of CfgNode
type.java.lang.IllegalStateException
- when this object
does not have such parent node.public java.util.Collection<CfgModelNode> getParents()
CfgModelNode
getParents
in interface CfgModelNode
public java.util.Collection<CfgModelNode> getChildren()
CfgModelNode
getChildren
in interface CfgModelNode