# Interface: com.pnfsoftware.jeb.core.units.code.android.dex.IDalvikInstruction

Definition of a Dalvik instruction. Retrieved via methods in the container [IDexCodeItem](IDexCodeItem) object.

## Static Field: INDEX_IS_FIELD_OFFSET
Type: `int`

Constant value: `34`
Description: Constant value for `index-is-field-offset`.

## Static Field: INDEX_IS_INLINE_OFFSET
Type: `int`

Constant value: `32`
Description: Constant value for `index-is-inline-offset`.

## Static Field: INDEX_IS_VTABLE_OFFSET
Type: `int`

Constant value: `33`
Description: Constant value for `index-is-vtable-offset`.

## Static Field: INDEX_TO_CALL_SITE
Type: `int`

Constant value: `21`
Description: Constant value for `index-to-call-site`.

## Static Field: INDEX_TO_FIELD
Type: `int`

Constant value: `18`
Description: Constant value for `index-to-field`.

## Static Field: INDEX_TO_METHOD
Type: `int`

Constant value: `19`
Description: Constant value for `index-to-method`.

## Static Field: INDEX_TO_METHOD_HANDLE
Type: `int`

Constant value: `22`
Description: Constant value for `index-to-method-handle`.

## Static Field: INDEX_TO_PROTOTYPE
Type: `int`

Constant value: `20`
Description: Constant value for `index-to-prototype`.

## Static Field: INDEX_TO_STRING
Type: `int`

Constant value: `16`
Description: Constant value for `index-to-string`.

## Static Field: INDEX_TO_TYPE
Type: `int`

Constant value: `17`
Description: Constant value for `index-to-type`.

## Static Field: TYPE_BRA
Type: `int`

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

## Static Field: TYPE_IDX
Type: `int`

Constant value: `2`
Description: Operand type for an index into a constant pool \(which pool is instruction specific\). The index may reference a type, a string, a field, a method, or a call site. It cannot be used to reference a prototype \(see [#TYPE_IDX2](#TYPE_IDX2). An instruction can have at most one such index.
 Value: an unsigned int

## Static Field: TYPE_IDX2
Type: `int`

Constant value: `5`
Description: Operand type for a second index into the prototype pool. An instruction can have at most one such index, and only if it also has a first index parameters \(type [#TYPE_IDX](#TYPE_IDX)\).
 Value: an unsigned int

## Static Field: TYPE_IMM
Type: `int`

Constant value: `1`
Description: Operand type for an immediate.
 Value: long, sign\-extended, could be anything from a boolean to a double

## Static Field: TYPE_REG
Type: `int`

Constant value: `0`
Description: Operand type for a register or pair of registers.
 Value: int, the register index \(or first register index , in case of a pair\)

## Static Field: TYPE_RGR
Type: `int`

Constant value: `4`
Description: 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\)

## Method: getArrayData
- return type: `com.pnfsoftware.jeb.core.units.code.android.dex.IDalvikInstructionArrayData`

Description: Get the instruction array data.
return: the array data, null of the instruction is not `fill-array-data`

## Method: getCode
- return type: `byte[]`

Description: For pseudo\-instructions, additional data bytes can be retrieved via [#getArrayData()](#getArrayData()) or [#getSwitchData()](#getSwitchData()).

## Method: getOpcode
- return type: `int`

Description: Get the Dalvik instruction opcode, as defined in [DalvikInstructionOpcodes](DalvikInstructionOpcodes).
return: the opcode

## Method: getParameter
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.android.dex.IDalvikInstructionParameter`

Description: Get an instruction operand by index, typed as a proper Dalvik parameter.
parameter: index: the zero\-based parameter index
return: the Dalvik instruction parameter

## Method: getParameterCount
- return type: `int`

Description: Get the count of parameters.
return: the number of parameters

## Method: getParameterFirstIndexType
- return type: `int`

Description: If this instruction has an index parameter \(of type [#TYPE_IDX](#TYPE_IDX)\), retrieve the kind of pool that is referenced by this parameter index value.
return: one of the `INDEX_xxx` constant defined in this class, or 0 if the         instruction does not have a first index parameter

## Method: getParameterSecondIndexType
- return type: `int`

Description: If this instruction has a second index parameter \(of type [#TYPE_IDX2](#TYPE_IDX2)\), retrieve the kind of pool that is referenced by this parameter index value.
return: one of the `INDEX_xxx` constant defined in this class, or 0 if the         instruction does not have a second index parameter

## Method: getParameterType
- parameter: `index`, type: `int`
- return type: `int`

Description: Get the type of a parameter. Refer to `TYPE_xxx` constants.
parameter: index: the zero\-based parameter index
return: one of the `TYPE_xxx` constants

## Method: getParameterValue
- parameter: `index`, type: `int`
- return type: `long`

Description: Get the value of a parameter.
parameter: index: the zero\-based parameter index
return: the parameter value

## Method: getParameters
- return type: `com.pnfsoftware.jeb.core.units.code.android.dex.IDalvikInstructionParameter[]`

Description: Get the instruction operands typed as proper Dalvik parameters. 

 This method is a convenience method, that does the same thing as [#getOperands()](#getOperands()) but returns Dalvik\-typed parameters instead of generic [IInstructionOperand](IInstructionOperand)\-typed object.
return: an array of Dalvik instruction parameters

## Method: getSwitchData
- return type: `com.pnfsoftware.jeb.core.units.code.android.dex.IDalvikInstructionSwitchData`

Description: Get the instruction switch data.
return: the switch payload object, or null if the instruction is neither         `packed-switch` nor `sparse-switch`

## Method: isArray
- return type: `boolean`

Description: Determine if the instruction is an array initializer.
return: true if this instruction is an array payload instruction

## Method: isOptimized
- return type: `boolean`

Description: Provide a hint if the instruction looks like an optimized \(non\-standard\) instruction, such as an odex or Art.
return: true if this instruction appears to use a non\-standard optimized opcode

## Method: isPseudoInstruction
- return type: `boolean`

Description: Determine if this instruction is a so\-called pseudo instruction, that is, a switch or an array\-initialization instruction.
return: true if this is a switch or array payload instruction

## Method: isSwitch
- return type: `boolean`

Description: Determine if the instruction is a switch.
return: true if this instruction is a switch payload instruction

