Class RopMethod

java.lang.Object
com.android.dx.rop.code.RopMethod

public final class RopMethod extends Object
All of the parts that make up a method at the rop layer.
  • Constructor Details

    • RopMethod

      public RopMethod(BasicBlockList blocks, int firstLabel)
      Constructs an instance.
      Parameters:
      blocks - non-null; basic block list of the method
      firstLabel - >= 0; the label of the first block to execute
  • Method Details

    • getBlocks

      public BasicBlockList getBlocks()
      Gets the basic block list for this method.
      Returns:
      non-null; the list
    • getFirstLabel

      public int getFirstLabel()
      Gets the label for the first block in the method that this list represents.
      Returns:
      >= 0; the first-block label
    • labelToPredecessors

      public IntList labelToPredecessors(int label)
      Gets the predecessors associated with the given block. This throws an exception if there is no block with the given label.
      Parameters:
      label - >= 0; the label of the block in question
      Returns:
      non-null; the predecessors of that block
    • getExitPredecessors

      public IntList getExitPredecessors()
      Gets the exit predecessors for this instance.
      Returns:
      non-null; the exit predecessors
    • withRegisterOffset

      public RopMethod withRegisterOffset(int delta)
      Returns an instance that is identical to this one, except that the registers in each instruction are offset by the given amount.
      Parameters:
      delta - the amount to offset register numbers by
      Returns:
      non-null; an appropriately-constructed instance