public class ExceptionBlockImpl extends SingleSuccessorBlockImpl implements ExceptionBlock
Block
implementation hierarchy.Block.BlockType
Modifier and Type | Field and Description |
---|---|
protected Map<TypeMirror,Set<Block>> |
exceptionalSuccessors
Set of exceptional successors.
|
protected @Nullable Node |
node
The node of this block.
|
flowRule, successor
predecessors, type
Constructor and Description |
---|
ExceptionBlockImpl()
Create an empty exceptional block.
|
Modifier and Type | Method and Description |
---|---|
void |
addExceptionalSuccessor(BlockImpl b,
TypeMirror cause)
Add an exceptional successor.
|
Map<TypeMirror,Set<Block>> |
getExceptionalSuccessors()
Returns the list of exceptional successor blocks as an unmodifiable map.
|
@Nullable Node |
getLastNode()
Returns the last node of this block, or null if none.
|
Node |
getNode()
Returns the node of this block.
|
List<Node> |
getNodes()
Returns the nodes contained within this basic block.
|
Set<Block> |
getSuccessors()
Returns the successors of this basic block.
|
void |
setNode(Node c)
Set the node.
|
String |
toString() |
getFlowRule, getSuccessor, setFlowRule, setSuccessor
addPredecessor, getPredecessors, getType, getUid, removePredecessor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFlowRule, getSuccessor, setFlowRule
getPredecessors, getType
protected final Map<TypeMirror,Set<Block>> exceptionalSuccessors
public ExceptionBlockImpl()
public void setNode(Node c)
public Node getNode()
ExceptionBlock
getNode
in interface ExceptionBlock
public List<Node> getNodes()
The following invariant holds.
forall n in getNodes() :: n.getBlock() == this
This implementation returns a singleton list.
public @Nullable Node getLastNode()
Block
getLastNode
in interface Block
null
public void addExceptionalSuccessor(BlockImpl b, TypeMirror cause)
b
- the successorcause
- the exception type that leads to the given blockpublic Map<TypeMirror,Set<Block>> getExceptionalSuccessors()
ExceptionBlock
getExceptionalSuccessors
in interface ExceptionBlock
public Set<Block> getSuccessors()
Block
getSuccessors
in interface Block
getSuccessors
in class SingleSuccessorBlockImpl