Class ByteBlock

java.lang.Object
com.android.dx.cf.code.ByteBlock
All Implemented Interfaces:
LabeledItem

public final class ByteBlock extends Object implements LabeledItem
Representation of a basic block in a bytecode array.
  • Constructor Details

    • ByteBlock

      public ByteBlock(int label, int start, int end, IntList successors, ByteCatchList catches)
      Constructs an instance.
      Parameters:
      label - >= 0; target label for this block
      start - >= 0; bytecode offset (inclusive) of the start of the block
      end - > start; bytecode offset (exclusive) of the end of the block
      successors - non-null; list of successors that this block may branch to
      catches - non-null; list of exceptions caught and their handler targets
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLabel

      public int getLabel()
      Gets the label of this block.
      Specified by:
      getLabel in interface LabeledItem
      Returns:
      >= 0; the label
    • getStart

      public int getStart()
      Gets the bytecode offset (inclusive) of the start of this block.
      Returns:
      >= 0; the start offset
    • getEnd

      public int getEnd()
      Gets the bytecode offset (exclusive) of the end of this block.
      Returns:
      > getStart(); the end offset
    • getSuccessors

      public IntList getSuccessors()
      Gets the list of successors that this block may branch to non-exceptionally.
      Returns:
      non-null; the successor list
    • getCatches

      public ByteCatchList getCatches()
      Gets the list of exceptions caught and their handler targets.
      Returns:
      non-null; the catch list