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.UniqueId
Represents a basic block in a control flow graph.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The types of basic blocks.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the last node of this block, or null if none.
    Returns the nodes contained within this basic block.
    Returns the predecessors of this basic block.
    Returns the successors of this basic block.
    Returns the type of this basic block.

    Methods inherited from interface org.plumelib.util.UniqueId

    getClassAndUid, getUid
  • Method Details

    • getType

      Block.BlockType getType()
      Returns the type of this basic block.
      Returns:
      the type of this basic block
    • getPredecessors

      Set<Block> getPredecessors()
      Returns the predecessors of this basic block.
      Returns:
      the predecessors of this basic block
    • getSuccessors

      Set<Block> getSuccessors()
      Returns the successors of this basic block.
      Returns:
      the successors of this basic block
    • getNodes

      @Pure 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
    • getLastNode

      @Nullable Node getLastNode()
      Returns the last node of this block, or null if none.
      Returns:
      the last node of this block or null