com.android.dx.cf.code
Class ByteBlock

java.lang.Object
  extended by 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 Summary
ByteBlock(int label, int start, int end, IntList successors, ByteCatchList catches)
          Constructs an instance.
 
Method Summary
 ByteCatchList getCatches()
          Gets the list of exceptions caught and their handler targets.
 int getEnd()
          Gets the bytecode offset (exclusive) of the end of this block.
 int getLabel()
          Gets the label of this block.
 int getStart()
          Gets the bytecode offset (inclusive) of the start of this block.
 IntList getSuccessors()
          Gets the list of successors that this block may branch to non-exceptionally.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2015. All rights reserved.