public class Sink extends CfgNode
Sink node does not have child nodes and has only one parent node.
childNode, parentNode
Constructor and Description |
---|
Sink()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(CfgModelNode node)
Throws an exception, because object does not have child nodes.
|
CfgModelNode |
deepCopy()
Returns a copy of this node.
|
java.util.Collection<CfgModelNode> |
getChildren()
Return child nodes.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getDefines()
Returns a set of defined variables.
|
CfgModelNode |
getOnlyChild()
Returns the only child node.
|
CfgModelNode |
getOnlyParent()
Returns the only parent node.
|
CfgNodeType |
getType()
Returns node type.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getUses()
Returns a set of used variables.
|
boolean |
hasChildren()
Checks rather node has child nodes.
|
boolean |
hasOnlyChild()
Checks rather node has exactly one child node.
|
boolean |
hasOnlyParent()
Checks rather node has exactly one parent node.
|
boolean |
hasParents()
Checks rather node has parent nodes.
|
void |
removeChild(CfgModelNode node)
Throws an exception, because object does not have child nodes.
|
addParent, equals, getDescription, getId, getParents, hashCode, removeParent
addMetaInfo, addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo, removeMetaInfo
public CfgModelNode deepCopy()
CfgModelNode
The copy does not keep the same links to parent or child nodes as this has.
public boolean hasParents()
CfgModelNode
hasParents
in interface CfgModelNode
hasParents
in class CfgNode
true
if node has at least one parent, false
otherwise.public boolean hasOnlyParent()
CfgModelNode
true
if node has exactly one parent at the moment, false
otherwise.public CfgModelNode getOnlyChild()
CfgModelNode
public void addChild(CfgModelNode node)
addChild
in interface CfgModelNode
addChild
in class CfgNode
node
- child nodejava.lang.UnsupportedOperationException
- every time it is called.public void removeChild(CfgModelNode node)
removeChild
in interface CfgModelNode
removeChild
in class CfgNode
node
- child nodejava.lang.UnsupportedOperationException
- every time it is called.public java.util.Collection<CfgModelNode> getChildren()
CfgModelNode
getChildren
in interface CfgModelNode
getChildren
in class CfgNode
public CfgNodeType getType()
CfgModelNode
By default, node has CfgNodeType.UNKNOWN
type.
public boolean hasChildren()
CfgModelNode
hasChildren
in interface CfgModelNode
hasChildren
in class CfgNode
true
if node has at least one child, false
otherwise.public boolean hasOnlyChild()
CfgModelNode
true
if node has exactly one child at the moment, false
otherwise.public CfgModelNode getOnlyParent()
CfgModelNode
public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getUses()
UseDef
public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getDefines()
UseDef