Top Description Fields Constructors Methods
org.droidparts.dexmaker.dx.dex.code

public final Class BlockAddresses

extends Object
Class Inheritance
Imports
org.droidparts.dexmaker.dx.rop.code.*

Container for the set of CodeAddress instances associated with the blocks of a particular method. Each block has a corresponding start address, end address, and last instruction address.

Field Summary

Modifier and TypeField and Description
private final CodeAddress[]
ends

non-null; array containing addresses for the end (just past the final instruction) of each basic block (indexed by basic block label)

private final CodeAddress[]
lasts

non-null; array containing addresses for the final instruction of each basic block (indexed by basic block label)

private final CodeAddress[]
starts

non-null; array containing addresses for the start of each basic block (indexed by basic block label)

Constructor Summary

AccessConstructor and Description
public
BlockAddresses(RopMethod
non-null; the method to have block addresses for
method
)

Constructs an instance.

Method Summary

Modifier and TypeMethod and Description
public CodeAddress

Returns:

non-null; the appropriate instance
getEnd
(BasicBlock
non-null; the block in question
block
)

Gets the instance for the end (address after the final instruction) of the given block.

public CodeAddress

Returns:

non-null; the appropriate instance
getEnd
(int
non-null; the label of the block in question
label
)

Gets the instance for the end (address after the final instruction) of the block with the given label.

public CodeAddress

Returns:

non-null; the appropriate instance
getLast
(BasicBlock
non-null; the block in question
block
)

Gets the instance for the final instruction of the given block.

public CodeAddress

Returns:

non-null; the appropriate instance
getLast
(int
non-null; the label of the block in question
label
)

Gets the instance for the final instruction of the block with the given label.

public CodeAddress

Returns:

non-null; the appropriate instance
getStart
(BasicBlock
non-null; the block in question
block
)

Gets the instance for the start of the given block.

public CodeAddress

Returns:

non-null; the appropriate instance
getStart
(int
non-null; the label of the block in question
label
)

Gets the instance for the start of the block with the given label.

private void
setupArrays(RopMethod method)

Sets up the address arrays.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

endsback to summary
private final CodeAddress[] ends

non-null; array containing addresses for the end (just past the final instruction) of each basic block (indexed by basic block label)

lastsback to summary
private final CodeAddress[] lasts

non-null; array containing addresses for the final instruction of each basic block (indexed by basic block label)

startsback to summary
private final CodeAddress[] starts

non-null; array containing addresses for the start of each basic block (indexed by basic block label)

Constructor Detail

BlockAddressesback to summary
public BlockAddresses(RopMethod method)

Constructs an instance.

Parameters
method:RopMethod

non-null; the method to have block addresses for

Method Detail

getEndback to summary
public CodeAddress getEnd(BasicBlock block)

Gets the instance for the end (address after the final instruction) of the given block.

Parameters
block:BasicBlock

non-null; the block in question

Returns:CodeAddress

non-null; the appropriate instance

getEndback to summary
public CodeAddress getEnd(int label)

Gets the instance for the end (address after the final instruction) of the block with the given label.

Parameters
label:int

non-null; the label of the block in question

Returns:CodeAddress

non-null; the appropriate instance

getLastback to summary
public CodeAddress getLast(BasicBlock block)

Gets the instance for the final instruction of the given block.

Parameters
block:BasicBlock

non-null; the block in question

Returns:CodeAddress

non-null; the appropriate instance

getLastback to summary
public CodeAddress getLast(int label)

Gets the instance for the final instruction of the block with the given label.

Parameters
label:int

non-null; the label of the block in question

Returns:CodeAddress

non-null; the appropriate instance

getStartback to summary
public CodeAddress getStart(BasicBlock block)

Gets the instance for the start of the given block.

Parameters
block:BasicBlock

non-null; the block in question

Returns:CodeAddress

non-null; the appropriate instance

getStartback to summary
public CodeAddress getStart(int label)

Gets the instance for the start of the block with the given label.

Parameters
label:int

non-null; the label of the block in question

Returns:CodeAddress

non-null; the appropriate instance

setupArraysback to summary
private void setupArrays(RopMethod method)

Sets up the address arrays.