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 Link icon

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

    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 Link icon

    getClassAndUid, getUid
  • Method Details Link icon

    • getType Link icon

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

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

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

      @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 Link icon

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