|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.io.instructions.DecodedInstruction
public abstract class DecodedInstruction
A decoded Dalvik instruction. This consists of a format codec, a numeric opcode, an optional index type, and any additional arguments of the instruction. The additional arguments (if any) are represented as uninterpreted data.
Note: The names of the arguments are not meant to match the names given in the Dalvik instruction format specification, specification which just names fields (somewhat) arbitrarily alphabetically from A. In this class, non-register fields are given descriptive names and register fields are consistently named alphabetically.
| Constructor Summary | |
|---|---|
DecodedInstruction(InstructionCodec format,
int opcode,
int index,
IndexType indexType,
int target,
long literal)
Constructs an instance. |
|
| Method Summary | |
|---|---|
static DecodedInstruction |
decode(CodeInput in)
Decodes an instruction from the given input source. |
static DecodedInstruction[] |
decodeAll(short[] encodedInstructions)
Decodes an array of instructions. |
void |
encode(CodeOutput out)
Encodes this instance to the given output. |
int |
getA()
|
short |
getAByte()
Gets the A register number, as a byte. |
short |
getANibble()
Gets the A register number, as a nibble. |
short |
getAUnit()
Gets the A register number, as a code unit. |
int |
getB()
|
short |
getBByte()
Gets the B register number, as a byte. |
short |
getBNibble()
Gets the B register number, as a nibble. |
short |
getBUnit()
Gets the B register number, as a code unit. |
int |
getC()
|
short |
getCByte()
Gets the C register number, as a byte. |
short |
getCNibble()
Gets the C register number, as a nibble. |
short |
getCUnit()
Gets the C register number, as a code unit. |
int |
getD()
|
short |
getDByte()
Gets the D register number, as a byte. |
short |
getDNibble()
Gets the D register number, as a nibble. |
short |
getDUnit()
Gets the D register number, as a code unit. |
int |
getE()
|
short |
getENibble()
Gets the E register number, as a nibble. |
InstructionCodec |
getFormat()
|
int |
getIndex()
|
IndexType |
getIndexType()
|
short |
getIndexUnit()
Gets the index, as a code unit. |
long |
getLiteral()
|
int |
getLiteralByte()
Gets the literal value, masked to be a byte in size. |
int |
getLiteralInt()
Gets the literal value, masked to be an int in size. |
int |
getLiteralNibble()
Gets the literal value, masked to be a nibble in size. |
short |
getLiteralUnit()
Gets the literal value, as a code unit. |
int |
getOpcode()
|
short |
getOpcodeUnit()
Gets the opcode, as a code unit. |
abstract int |
getRegisterCount()
|
short |
getRegisterCountUnit()
Gets the register count, as a code unit. |
int |
getTarget()
Gets the raw target. |
int |
getTarget(int baseAddress)
Gets the target as a relative offset from the given address. |
int |
getTargetByte(int baseAddress)
Gets the target as a relative offset from the given base address, masked to be a byte in size. |
short |
getTargetUnit(int baseAddress)
Gets the target as a relative offset from the given base address, as a code unit. |
abstract DecodedInstruction |
withIndex(int newIndex)
Returns an instance just like this one, except with the index replaced with the given one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DecodedInstruction(InstructionCodec format,
int opcode,
int index,
IndexType indexType,
int target,
long literal)
| Method Detail |
|---|
public static DecodedInstruction decode(CodeInput in)
throws EOFException
EOFExceptionpublic static DecodedInstruction[] decodeAll(short[] encodedInstructions)
public final InstructionCodec getFormat()
public final int getOpcode()
public final short getOpcodeUnit()
public final int getIndex()
public final short getIndexUnit()
public final IndexType getIndexType()
public final int getTarget()
public final int getTarget(int baseAddress)
public final short getTargetUnit(int baseAddress)
public final int getTargetByte(int baseAddress)
public final long getLiteral()
public final int getLiteralInt()
public final short getLiteralUnit()
public final int getLiteralByte()
public final int getLiteralNibble()
public abstract int getRegisterCount()
public int getA()
public int getB()
public int getC()
public int getD()
public int getE()
public final short getRegisterCountUnit()
public final short getAUnit()
public final short getAByte()
public final short getANibble()
public final short getBUnit()
public final short getBByte()
public final short getBNibble()
public final short getCUnit()
public final short getCByte()
public final short getCNibble()
public final short getDUnit()
public final short getDByte()
public final short getDNibble()
public final short getENibble()
public final void encode(CodeOutput out)
public abstract DecodedInstruction withIndex(int newIndex)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||