Class RegularBlockImpl
java.lang.Object
org.checkerframework.dataflow.cfg.block.BlockImpl
org.checkerframework.dataflow.cfg.block.SingleSuccessorBlockImpl
org.checkerframework.dataflow.cfg.block.RegularBlockImpl
- All Implemented Interfaces:
Block
,RegularBlock
,SingleSuccessorBlock
,org.plumelib.util.UniqueId
Implementation of a regular basic block.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.checkerframework.dataflow.cfg.block.Block
Block.BlockType
-
Field Summary
Modifier and TypeFieldDescriptionInternal representation of the contents.Fields inherited from class org.checkerframework.dataflow.cfg.block.SingleSuccessorBlockImpl
flowRule, successor
Fields inherited from class org.checkerframework.dataflow.cfg.block.BlockImpl
predecessors, type
-
Constructor Summary
ConstructorDescriptionInitialize an empty basic block to be filled with contents and linked to other basic blocks later. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a node to the contents of this basic block.void
Add multiple nodes to the contents of this basic block.Returns the last node of this block, or null if none.getNodes()
Returns the nodes contained within this basic block.Returns the regular successor block.boolean
isEmpty()
Is this block empty (i.e., does it not contain any contents).toString()
Methods inherited from class org.checkerframework.dataflow.cfg.block.SingleSuccessorBlockImpl
getFlowRule, getSuccessor, getSuccessors, setFlowRule, setSuccessor
Methods inherited from class org.checkerframework.dataflow.cfg.block.BlockImpl
addPredecessor, getPredecessors, getType, getUid, removePredecessor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.checkerframework.dataflow.cfg.block.Block
getPredecessors, getSuccessors, getType
Methods inherited from interface org.checkerframework.dataflow.cfg.block.SingleSuccessorBlock
getFlowRule, getSuccessor, setFlowRule
Methods inherited from interface org.plumelib.util.UniqueId
getClassAndUid, getUid
-
Field Details
-
contents
Internal representation of the contents.
-
-
Constructor Details
-
RegularBlockImpl
public RegularBlockImpl()Initialize an empty basic block to be filled with contents and linked to other basic blocks later.
-
-
Method Details
-
addNode
Add a node to the contents of this basic block. -
addNodes
Add multiple nodes to the contents of this basic block. -
getNodes
Returns the nodes contained within this basic block. The list may be empty.The following invariant holds.
forall n in getNodes() :: n.getBlock() == this
This implementation returns an non-empty list.
-
getLastNode
Description copied from interface:Block
Returns the last node of this block, or null if none.- Specified by:
getLastNode
in interfaceBlock
- Returns:
- the last node of this block or
null
-
getRegularSuccessor
Description copied from interface:RegularBlock
Returns the regular successor block.- Specified by:
getRegularSuccessor
in interfaceRegularBlock
- Returns:
- the regular successor block
-
toString
-
isEmpty
public boolean isEmpty()Description copied from interface:RegularBlock
Is this block empty (i.e., does it not contain any contents).- Specified by:
isEmpty
in interfaceRegularBlock
-