public interface

IDalvikInstruction

implements ILocatedInstruction
com.pnfsoftware.jeb.core.units.code.android.dex.IDalvikInstruction

Class Overview

TODO

Summary

Constants
int INDEX_IS_FIELD_OFFSET
int INDEX_IS_INLINE_OFFSET
int INDEX_IS_VTABLE_OFFSET
int INDEX_TO_FIELD
int INDEX_TO_METHOD
int INDEX_TO_STRING
int INDEX_TO_TYPE
int TYPE_BRA Operand type for branch target.
int TYPE_IDX Operand type for an index into a constant pool (which pool is instruction specific).
int TYPE_IMM Operand type for an immediate.
int TYPE_REG Operand type for a register.
int TYPE_RGR Operand type for a register range.
Public Methods
abstract IDalvikInstructionArrayData getArrayData()
abstract int getOpcode()
Get the Dalvik instruction opcode, as defined in DalvikInstructionOpcodes.
abstract int getParameterIndexType()
If this instruction has a parameter which is of type TYPE_IDX, retrieve the kind of pool that is referenced by this parameter index value.
abstract IDalvikInstructionParameter[] getParameters()
Get the instruction operands typed as proper Dalvik parameters.
abstract IDalvikInstructionSwitchData getSwitchData()
Get the instruction switch data.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.IInstruction
From interface com.pnfsoftware.jeb.core.units.code.ILocatedInstruction

Constants

public static final int INDEX_IS_FIELD_OFFSET

Constant Value: 34 (0x00000022)

public static final int INDEX_IS_INLINE_OFFSET

Constant Value: 32 (0x00000020)

public static final int INDEX_IS_VTABLE_OFFSET

Constant Value: 33 (0x00000021)

public static final int INDEX_TO_FIELD

Constant Value: 18 (0x00000012)

public static final int INDEX_TO_METHOD

Constant Value: 19 (0x00000013)

public static final int INDEX_TO_STRING

Constant Value: 16 (0x00000010)

public static final int INDEX_TO_TYPE

Constant Value: 17 (0x00000011)

public static final int TYPE_BRA

Operand type for branch target.
Value: signed int, relative displacement in code units (2 bytes) from current instruction address

Constant Value: 3 (0x00000003)

public static final int TYPE_IDX

Operand type for an index into a constant pool (which pool is instruction specific).
Value: theoretically, an unsigned int

Constant Value: 2 (0x00000002)

public static final int TYPE_IMM

Operand type for an immediate.
Value: long, sign-extended, could be anything from a boolean to a double

Constant Value: 1 (0x00000001)

public static final int TYPE_REG

Operand type for a register.
Value: int, the register index (or first register index , in case of a pair)

Constant Value: 0 (0x00000000)

public static final int TYPE_RGR

Operand type for a register range.
Value: long, made up of 2 ints as follows: low-int=first register index, high-int=last register index (inclusive)

Constant Value: 4 (0x00000004)

Public Methods

public abstract IDalvikInstructionArrayData getArrayData ()

public abstract int getOpcode ()

Get the Dalvik instruction opcode, as defined in DalvikInstructionOpcodes.

Returns
  • the opcode

public abstract int getParameterIndexType ()

If this instruction has a parameter which is of type TYPE_IDX, retrieve the kind of pool that is referenced by this parameter index value.

Returns
  • one of the INDEX_xxx constant defined in this class, or 0 if the instruction does not contain an index parameter

public abstract IDalvikInstructionParameter[] getParameters ()

Get the instruction operands typed as proper Dalvik parameters.

This method is a convenience method, that does the same thing as getOperands() but returns Dalvik-typed parameters instead of generic IInstructionOperand-typed object.

public abstract IDalvikInstructionSwitchData getSwitchData ()

Get the instruction switch data.

Returns
  • the switch payload object, or null if the instruction is neither packed-switch nor sparse-switch