public abstract class CfgNode extends CfgModelNode
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 the specified node as child.
|
void |
addParent(CfgModelNode node)
Adds parent node.
|
java.util.Collection<CfgModelNode> |
getChildren()
Return child nodes.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getDefines()
Throws an exception.
|
java.lang.String |
getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
Returns node string description in the format of the specified printer.
|
java.util.Collection<CfgModelNode> |
getParents()
Returns parent nodes.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getUses()
Throws an exception.
|
boolean |
hasChildren()
Checks rather node has child nodes.
|
boolean |
hasParents()
Checks rather node has parent nodes.
|
void |
removeChild(CfgModelNode node)
Removes child node.
|
void |
removeParent(CfgModelNode node)
Removes parent node.
|
deepcopy, getId, getOnlyChild, getOnlyParent, getType
addMetaInfo, addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo, removeMetaInfo, removeMetaInfo
public java.lang.String getDescription(ru.ispras.fortress.expression.printer.ExprTreePrinter printer)
CfgModelNode
getDescription
in class CfgModelNode
printer
- printerpublic boolean hasParents()
CfgModelNode
hasParents
in class CfgModelNode
true
if node has at least one parent, false
otherwise.public boolean hasChildren()
CfgModelNode
hasChildren
in class CfgModelNode
true
if node has at least one child,
false
otherwise.public void addChild(CfgModelNode node)
addChild
in class CfgModelNode
node
- child nodejava.lang.NullPointerException
- when argument is null
.java.lang.IllegalStateException
- when this object already
has non-null child node.java.lang.IllegalArgumentException
- when the specified node
is not of CfgNode
type.public void addParent(CfgModelNode node)
addParent
in class CfgModelNode
node
- parent nodejava.lang.NullPointerException
- when argument is null
.java.lang.IllegalStateException
- when this object
already has non-null parent node.java.lang.IllegalArgumentException
- when the specified node
is not of CfgNode
type.public void removeChild(CfgModelNode node)
removeChild
in class CfgModelNode
node
- child nodejava.lang.NullPointerException
- when argument is null
.java.lang.IllegalStateException
- when this object
does not have such child node.java.lang.IllegalArgumentException
- when the specified node
is not of CfgNode
type.public void removeParent(CfgModelNode node)
removeParent
in class CfgModelNode
node
- parent nodejava.lang.NullPointerException
- when argument is null
.java.lang.IllegalStateException
- when this object
does not have such parent node.java.lang.IllegalArgumentException
- when the specified node
is not of CfgNode
type.public java.util.Collection<CfgModelNode> getParents()
CfgModelNode
getParents
in class CfgModelNode
public java.util.Collection<CfgModelNode> getChildren()
CfgModelNode
getChildren
in class CfgModelNode
public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getUses()
null
java.lang.UnsupportedOperationException
- every time it is called.public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getDefines()
null
java.lang.UnsupportedOperationException
- every time it is called.