Class ExceptionBlockImpl
java.lang.Object
org.checkerframework.dataflow.cfg.block.BlockImpl
org.checkerframework.dataflow.cfg.block.SingleSuccessorBlockImpl
org.checkerframework.dataflow.cfg.block.ExceptionBlockImpl
- All Implemented Interfaces:
Block
,ExceptionBlock
,SingleSuccessorBlock
,org.plumelib.util.UniqueId
Implementation of
ExceptionBlock
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.checkerframework.dataflow.cfg.block.Block
Block.BlockType
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map
<TypeMirror, Set<Block>> Set of exceptional successors.The node of this block.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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExceptionalSuccessor
(BlockImpl b, TypeMirror cause) Add an exceptional successor.Returns the list of exceptional successor blocks as an unmodifiable map.Returns the last node of this block, or null if none.getNode()
Returns the node of this block.getNodes()
Returns the nodes contained within this basic block.Returns the successors of this basic block.void
Set the node.toString()
Methods inherited from class org.checkerframework.dataflow.cfg.block.SingleSuccessorBlockImpl
getFlowRule, getSuccessor, 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, 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
-
node
The node of this block. -
exceptionalSuccessors
Set of exceptional successors.
-
-
Constructor Details
-
ExceptionBlockImpl
public ExceptionBlockImpl()Create an empty exceptional block.
-
-
Method Details
-
setNode
Set the node. -
getNode
Description copied from interface:ExceptionBlock
Returns the node of this block.- Specified by:
getNode
in interfaceExceptionBlock
- Returns:
- the node of this 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 a singleton 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
-
addExceptionalSuccessor
Add an exceptional successor.- Parameters:
b
- the successorcause
- the exception type that leads to the given block
-
getExceptionalSuccessors
Description copied from interface:ExceptionBlock
Returns the list of exceptional successor blocks as an unmodifiable map.- Specified by:
getExceptionalSuccessors
in interfaceExceptionBlock
- Returns:
- the list of exceptional successor blocks as an unmodifiable map
-
getSuccessors
Description copied from interface:Block
Returns the successors of this basic block.- Specified by:
getSuccessors
in interfaceBlock
- Overrides:
getSuccessors
in classSingleSuccessorBlockImpl
- Returns:
- the successors of this basic block
-
toString
-