com.android.dx.rop.code
Class RopMethod

java.lang.Object
  extended by 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 Summary
RopMethod(BasicBlockList blocks, int firstLabel)
          Constructs an instance.
 
Method Summary
 BasicBlockList getBlocks()
          Gets the basic block list for this method.
 IntList getExitPredecessors()
          Gets the exit predecessors for this instance.
 int getFirstLabel()
          Gets the label for the first block in the method that this list represents.
 IntList labelToPredecessors(int label)
          Gets the predecessors associated with the given block.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2013. All Rights Reserved.