public class DexDalvikInstruction
extends java.lang.Object
This class represents a Dalvik instruction.
Dalvik instructions are stored in DexCodeItem
objects, themselves stored in DexMethodData
objects,
themselves referenced in DexClassData
objects, themselves contained in DexClass
objects.
The original description of Dalvik instructions can be found here:
Modifier and Type | Class and Description |
---|---|
static class |
DexDalvikInstruction.ArrayData
This class represent the array data for the
fill-array-data instruction. |
static class |
DexDalvikInstruction.Parameter
Parameter for a Dalvik instruction.
|
static class |
DexDalvikInstruction.SwitchData
This class represents the jump table of a switch instruction.
|
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_BRA
Parameter type: branch target
Parameter value: signed integer, relative displacement in code units (2 bytes) from current instruction address |
static int |
TYPE_IDX
Parameter type: index into a constant pool (which pool is determined by the instruction)
Parameter value: an unsigned integer |
static int |
TYPE_IMM
Parameter type: immediate value
Parameter value: sign-extended long, can be anything from a boolean to a double |
static int |
TYPE_REG
Parameter type: register
Parameter value: register index (or first register index , in case of a pair) |
static int |
TYPE_RGR
Parameter type: register range
Parameter value: long, made up of 2 integers as follows: low-int: first register index high-int: last register index (inclusive) |
Modifier and Type | Method and Description |
---|---|
DexDalvikInstruction.ArrayData |
getArrayData()
Get the instruction array data.
|
byte[] |
getCode()
Get the instruction bytecode.
|
java.lang.String |
getMnemonic()
Get the instruction mnemonic string.
|
int |
getOffset()
Get the instruction offset in bytes.
|
DexDalvikInstruction.Parameter[] |
getParameters()
Get the instruction parameters.
|
int |
getSize()
Get the instruction size, in bytes.
|
DexDalvikInstruction.SwitchData |
getSwitchData()
Get the instruction switch data.
|
public static final int TYPE_REG
public static final int TYPE_IMM
public static final int TYPE_IDX
public static final int TYPE_BRA
public static final int TYPE_RGR
public int getOffset()
Get the instruction offset in bytes.
public int getSize()
Get the instruction size, in bytes.
public java.lang.String getMnemonic()
Get the instruction mnemonic string.
Mnemonics are defined in Bytecode for the Dalvik VM.
public byte[] getCode()
Get the instruction bytecode.
public DexDalvikInstruction.Parameter[] getParameters()
Get the instruction parameters.
public DexDalvikInstruction.SwitchData getSwitchData()
Get the instruction switch data.
packed-switch
nor sparse-switch
public DexDalvikInstruction.ArrayData getArrayData()
Get the instruction array data.
fill-array-data