Class SingleSuccessorBlockImpl
- java.lang.Object
-
- org.checkerframework.dataflow.cfg.block.BlockImpl
-
- org.checkerframework.dataflow.cfg.block.SingleSuccessorBlockImpl
-
- All Implemented Interfaces:
Block
,SingleSuccessorBlock
,org.plumelib.util.UniqueId
- Direct Known Subclasses:
ExceptionBlockImpl
,RegularBlockImpl
,SpecialBlockImpl
public abstract class SingleSuccessorBlockImpl extends BlockImpl implements SingleSuccessorBlock
A basic block that has at most one successor. SpecialBlockImpl extends this, but exit blocks have no successor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.checkerframework.dataflow.cfg.block.Block
Block.BlockType
-
-
Field Summary
Fields Modifier and Type Field Description protected Store.FlowRule
flowRule
The initial value for the rule below says that EACH store at the end of a single successor block flows to the corresponding store of the successor.protected @Nullable BlockImpl
successor
Internal representation of the successor.-
Fields inherited from class org.checkerframework.dataflow.cfg.block.BlockImpl
predecessors, type
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SingleSuccessorBlockImpl(Block.BlockType type)
Creates a new SingleSuccessorBlock.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Store.FlowRule
getFlowRule()
Returns the flow rule for information flowing from this block to its successor.@Nullable Block
getSuccessor()
Returns the non-exceptional successor block, ornull
if there is no non-exceptional successor.java.util.Set<Block>
getSuccessors()
Returns the successors of this basic block.void
setFlowRule(Store.FlowRule rule)
Set the flow rule for information flowing from this block to its successor.void
setSuccessor(BlockImpl successor)
Set a basic block as the successor of this block.-
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, toString, wait, wait, wait
-
Methods inherited from interface org.checkerframework.dataflow.cfg.block.Block
getLastNode, getNodes, getPredecessors, getType
-
-
-
-
Field Detail
-
successor
protected @Nullable BlockImpl successor
Internal representation of the successor.Is set by
setSuccessor(org.checkerframework.dataflow.cfg.block.BlockImpl)
.
-
flowRule
protected Store.FlowRule flowRule
The initial value for the rule below says that EACH store at the end of a single successor block flows to the corresponding store of the successor.
-
-
Constructor Detail
-
SingleSuccessorBlockImpl
protected SingleSuccessorBlockImpl(Block.BlockType type)
Creates a new SingleSuccessorBlock.- Parameters:
type
- the type of this basic block
-
-
Method Detail
-
getSuccessor
public @Nullable Block getSuccessor()
Description copied from interface:SingleSuccessorBlock
Returns the non-exceptional successor block, ornull
if there is no non-exceptional successor.- Specified by:
getSuccessor
in interfaceSingleSuccessorBlock
- Returns:
- the non-exceptional successor block, or
null
if there is no non-exceptional successor
-
getSuccessors
public java.util.Set<Block> getSuccessors()
Description copied from interface:Block
Returns the successors of this basic block.- Specified by:
getSuccessors
in interfaceBlock
- Returns:
- the successors of this basic block
-
setSuccessor
public void setSuccessor(BlockImpl successor)
Set a basic block as the successor of this block.- Parameters:
successor
- the block that will be the successor of this
-
getFlowRule
public Store.FlowRule getFlowRule()
Description copied from interface:SingleSuccessorBlock
Returns the flow rule for information flowing from this block to its successor.- Specified by:
getFlowRule
in interfaceSingleSuccessorBlock
- Returns:
- the flow rule for information flowing from this block to its successor
-
setFlowRule
public void setFlowRule(Store.FlowRule rule)
Description copied from interface:SingleSuccessorBlock
Set the flow rule for information flowing from this block to its successor.- Specified by:
setFlowRule
in interfaceSingleSuccessorBlock
- Parameters:
rule
- the new flow rule for information flowing from this block to its successor
-
-