Top Description Fields Constructors Methods
org.droidparts.dexmaker.dx.io.instructions

public abstract Class BaseCodeCursor

extends Object
implements CodeCursor
Class Inheritance
All Implemented Interfaces
org.droidparts.dexmaker.dx.io.instructions.CodeCursor
Known Direct Subclasses
org.droidparts.dexmaker.dx.io.instructions.ShortArrayCodeInput, org.droidparts.dexmaker.dx.io.instructions.ShortArrayCodeOutput

Base implementation of CodeCursor.

Field Summary

Modifier and TypeField and Description
private final AddressMap
baseAddressMap

base address map

private int
cursor

next index within array to read from or write to

Constructor Summary

AccessConstructor and Description
public
BaseCodeCursor()

Constructs an instance.

Method Summary

Modifier and TypeMethod and Description
protected final void
advance(int amount)

Advance the cursor by the indicated amount.

public final int
baseAddressForCursor()

Implements org.droidparts.dexmaker.dx.io.instructions.CodeCursor.baseAddressForCursor.

Gets the base address associated with the current cursor.
public final int
public final void
setBaseAddress(int targetAddress, int baseAddress)

Implements org.droidparts.dexmaker.dx.io.instructions.CodeCursor.setBaseAddress.

Sets the base address for the given target address to be as indicated.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseAddressMapback to summary
private final AddressMap baseAddressMap

base address map

cursorback to summary
private int cursor

next index within array to read from or write to

Constructor Detail

BaseCodeCursorback to summary
public BaseCodeCursor()

Constructs an instance.

Method Detail

advanceback to summary
protected final void advance(int amount)

Advance the cursor by the indicated amount.

baseAddressForCursorback to summary
public final int baseAddressForCursor()

Implements org.droidparts.dexmaker.dx.io.instructions.CodeCursor.baseAddressForCursor.

Doc from org.droidparts.dexmaker.dx.io.instructions.CodeCursor.baseAddressForCursor.

Gets the base address associated with the current cursor. This differs from the cursor value when explicitly set (by {@link #setBaseAddress). This is used, in particular, to convey base addresses to switch data payload instructions, whose relative addresses are relative to the address of a dependant switch instruction.

cursorback to summary
public final int cursor()

Implements org.droidparts.dexmaker.dx.io.instructions.CodeCursor.cursor.

Doc from org.droidparts.dexmaker.dx.io.instructions.CodeCursor.cursor.

Gets the cursor. The cursor is the offset in code units from the start of the input of the next code unit to be read or written, where the input generally consists of the code for a single method.

setBaseAddressback to summary
public final void setBaseAddress(int targetAddress, int baseAddress)

Implements org.droidparts.dexmaker.dx.io.instructions.CodeCursor.setBaseAddress.

Doc from org.droidparts.dexmaker.dx.io.instructions.CodeCursor.setBaseAddress.

Sets the base address for the given target address to be as indicated.