Interface Block
-
- All Superinterfaces:
org.plumelib.util.UniqueId
- All Known Subinterfaces:
ConditionalBlock,ExceptionBlock,RegularBlock,SingleSuccessorBlock,SpecialBlock
- All Known Implementing Classes:
BlockImpl,ConditionalBlockImpl,ExceptionBlockImpl,RegularBlockImpl,SingleSuccessorBlockImpl,SpecialBlockImpl
public interface Block extends org.plumelib.util.UniqueIdRepresents a basic block in a control flow graph.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBlock.BlockTypeThe types of basic blocks.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable NodegetLastNode()Returns the last node of this block, or null if none.java.util.List<Node>getNodes()Returns the nodes contained within this basic block.java.util.Set<Block>getPredecessors()Returns the predecessors of this basic block.java.util.Set<Block>getSuccessors()Returns the successors of this basic block.Block.BlockTypegetType()Returns the type of this basic block.
-
-
-
Method Detail
-
getType
Block.BlockType getType()
Returns the type of this basic block.- Returns:
- the type of this basic block
-
getPredecessors
java.util.Set<Block> getPredecessors()
Returns the predecessors of this basic block.- Returns:
- the predecessors of this basic block
-
getSuccessors
java.util.Set<Block> getSuccessors()
Returns the successors of this basic block.- Returns:
- the successors of this basic block
-
getNodes
@Pure java.util.List<Node> 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
- Returns:
- the nodes contained within this basic block
-
-