Interface CodeCursor

All Known Subinterfaces:
CodeInput, CodeOutput
All Known Implementing Classes:
BaseCodeCursor, ShortArrayCodeInput, ShortArrayCodeOutput

public interface CodeCursor
Cursor over code units, for reading or writing out Dalvik bytecode.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the base address associated with the current cursor.
    int
    Gets the cursor.
    void
    setBaseAddress(int targetAddress, int baseAddress)
    Sets the base address for the given target address to be as indicated.
  • Method Details

    • cursor

      int 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.
    • baseAddressForCursor

      int baseAddressForCursor()
      Gets the base address associated with the current cursor. This differs from the cursor value when explicitly set (by setBaseAddress(int, int)). 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.
    • setBaseAddress

      void setBaseAddress(int targetAddress, int baseAddress)
      Sets the base address for the given target address to be as indicated.
      See Also: