|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jreversepro.reflect.JInstruction
Abstraction of a JVM Opcode instruction.
| Field Summary | |
byte[] |
args
Arguments to the current opcode instruction. |
int |
index
Index of this instruction onto the byte array of the method to be decompiled. |
java.lang.String |
insName
opcode name of the instruction. |
static int |
INVALID_VAR_INDEX
Invalid variable index. |
int |
length
Length of the instruction in bytes. |
int |
opcode
opcode of the JVM instruction. |
int |
position
Position of the method into the method pool |
boolean |
wide
If this is a wide instruction. |
| Fields inherited from interface jreversepro.common.KeyWords |
ANY, BOOLEAN, BREAK, BYTE, CASE, CHAR, CLASS, CLASS_STRING, CLINIT, CLOSE_BRACKET, COND_AND, COND_NOT, COND_OR, CONTINUE, DEFAULT, DEFAULT_PACKAGE, DOUBLE, EQUALTO, FALSE, FLOAT, FOREIGN_CLASS, FOREIGN_OBJ, GOTO, INIT, INSTANCEOF, INT, INTERFACE, JVM_BOOLEAN, JVM_CHAR, JVM_VOID, LANG_OBJECT, LENGTH, LONG, NEW, NULL, OPEN_BRACKET, OPR_EQ, OPR_GE, OPR_GT, OPR_LE, OPR_LT, OPR_NE, OPR_NOT, REFERENCE, RET_ADDR, RETURN, SHORT, SPACE, STATIC, SUPER, SWITCH, THIS, THISCLASS, THROW, TRUE, VOID |
| Constructor Summary | |
JInstruction(int rhsIndex,
int rhsOpcode,
byte[] rhsArgs,
boolean rhsWide)
|
|
| Method Summary | |
void |
append(JInstruction rhsNext)
Appends a instruction to this |
boolean |
equals(java.lang.Object obj)
|
int |
getArgByte()
|
int |
getArgByte(int pos)
|
int |
getArgInt()
|
int |
getArgInt(int pos)
|
int |
getArgShort()
|
int |
getArgShort(int pos)
|
int |
getArgUnsignedByte()
|
int |
getArgUnsignedByte(int pos)
|
int |
getArgUnsignedInt()
|
int |
getArgUnsignedInt(int pos)
|
int |
getArgUnsignedShort()
|
int |
getArgUnsignedShort(int pos)
|
int |
getArgUnsignedWide()
|
int |
getArgUnsignedWide(int pos)
|
int |
getArgWide()
|
int |
getArgWide(int pos)
|
java.lang.String |
getConditionalOperator()
In case this instruction is a branch instruction on some condition then the operator corresponding to the operator is returned. |
java.lang.String |
getInsName()
|
int |
getLength()
|
int |
getNextIndex()
|
int |
getOffset()
In case this instruction is a jump/branch instruction, this instruction returns the offset mentioned in the two bytes in the argument array. |
int |
getTargetPc()
In case this instruction is a jump/branch instruction, this instruction returns the offset + index mentioned in the two bytes in the argument array. |
int |
getTargetPc2()
In case this instruction is a jump/branch instruction, this instruction returns the offset mentioned in the two bytes in the argument array. |
int |
getTargetPcW()
In case this instruction is a jump/branch instruction, this instruction returns the offset mentioned in the two bytes in the argument array. |
boolean |
isAnIfIns()
Returns if this instruction is an if instruction or not. |
boolean |
isASwitchIns()
Returns if this instruction is a switch instruction or not. |
boolean |
isEndOfCatch()
|
boolean |
isEndOfLine()
To check if this instruction denotes the corresponding end-of-line in the source code. |
boolean |
isInvokeIns()
Denotes if this instruction invokes some other method or interface or a constructor. |
int |
isStoreInstruction()
In case this instruction is a store instruction, ( that is popping a local variable from the JVM stack ) , then that variable index is returned. |
JInstruction |
next()
|
JInstruction |
prev()
|
int |
referredVariable()
In case this instruction is a load instruction, ( that is loading a datatype onto the JVM stack ) , then that variable index is returned. |
java.lang.String |
toString()
Stringified form of JInstruction |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int INVALID_VAR_INDEX
public final int index
public final int opcode
public final byte[] args
public final java.lang.String insName
public final int length
public final boolean wide
public int position
| Constructor Detail |
public JInstruction(int rhsIndex,
int rhsOpcode,
byte[] rhsArgs,
boolean rhsWide)
rhsIndex - Index of the instruction into the
method bytecode array.rhsOpcode - Opcode of the JVM instruction.rhsArgs - Arguments to the JVM opcodes.rhsWide - If the previous instruction was a wide
instruction.| Method Detail |
public void append(JInstruction rhsNext)
rhsNext - Next Instruction to be appended to this.public JInstruction prev()
public JInstruction next()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - Object to be compared.
public int getLength()
public java.lang.String getInsName()
public int getNextIndex()
public int referredVariable()
public int isStoreInstruction()
public int getTargetPc2()
public int getTargetPc()
public int getOffset()
public int getTargetPcW()
public java.lang.String getConditionalOperator()
public boolean isASwitchIns()
public boolean isAnIfIns()
public boolean isEndOfLine()
public boolean isInvokeIns()
public final boolean isEndOfCatch()
public int getArgUnsignedWide()
public int getArgUnsignedWide(int pos)
pos - Position from which bytes are to be taken from stream
and the value to be written.
public int getArgUnsignedByte()
public int getArgUnsignedByte(int pos)
pos - Position from which bytes are to be taken from stream
and the value to be written.
public int getArgUnsignedShort()
public final int getArgUnsignedShort(int pos)
public int getArgUnsignedInt()
public int getArgUnsignedInt(int pos)
public int getArgWide()
public int getArgWide(int pos)
public int getArgByte()
public int getArgByte(int pos)
public int getArgShort()
public int getArgShort(int pos)
public int getArgInt()
public int getArgInt(int pos)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||