com.android.dx.io.instructions
Class BaseCodeCursor

java.lang.Object
  extended by com.android.dx.io.instructions.BaseCodeCursor
All Implemented Interfaces:
CodeCursor
Direct Known Subclasses:
ShortArrayCodeInput, ShortArrayCodeOutput

public abstract class BaseCodeCursor
extends Object
implements CodeCursor

Base implementation of CodeCursor.


Constructor Summary
BaseCodeCursor()
          Constructs an instance.
 
Method Summary
protected  void advance(int amount)
          Advance the cursor by the indicated amount.
 int baseAddressForCursor()
          Gets the base address associated with the current cursor.
 int cursor()
          Gets the cursor.
 void setBaseAddress(int targetAddress, int baseAddress)
          Sets the base address for the given target address to be as indicated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseCodeCursor

public BaseCodeCursor()
Constructs an instance.

Method Detail

cursor

public final int cursor()
Description copied from interface: CodeCursor
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.

Specified by:
cursor in interface CodeCursor

baseAddressForCursor

public final int baseAddressForCursor()
Description copied from interface: CodeCursor
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.

Specified by:
baseAddressForCursor in interface CodeCursor

setBaseAddress

public final void setBaseAddress(int targetAddress,
                                 int baseAddress)
Description copied from interface: CodeCursor
Sets the base address for the given target address to be as indicated.

Specified by:
setBaseAddress in interface CodeCursor
See Also:
CodeCursor.baseAddressForCursor()

advance

protected final void advance(int amount)
Advance the cursor by the indicated amount.



Copyright © 2013. All Rights Reserved.