|
ProGuard | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectproguard.classfile.instruction.Instruction
Base class for representing instructions.
| Field Summary | |
byte |
opcode
|
| Constructor Summary | |
Instruction()
|
|
| Method Summary | |
abstract void |
accept(ClassFile classFile,
MethodInfo methodInfo,
CodeAttrInfo codeAttrInfo,
int offset,
InstructionVisitor instructionVisitor)
Accepts the given visitor. |
String |
getName()
Returns the name of the instruction. |
boolean |
isCategory2()
Returns whether the instruction is a Category 2 instruction. |
protected boolean |
isWide()
Returns whether the instruction is wide, i.e. |
abstract int |
length(int offset)
Returns the length in bytes of the instruction. |
protected static int |
readByte(byte[] code,
int offset)
|
protected abstract void |
readInfo(byte[] code,
int offset)
Reads the data following the instruction opcode. |
protected static int |
readInt(byte[] code,
int offset)
|
protected static int |
readShort(byte[] code,
int offset)
|
protected static int |
readSignedByte(byte[] code,
int offset)
|
protected static int |
readSignedShort(byte[] code,
int offset)
|
protected static int |
readSignedValue(byte[] code,
int offset,
int valueSize)
|
protected static int |
readValue(byte[] code,
int offset,
int valueSize)
|
abstract Instruction |
shrink()
Shrinks this instruction to its shortest possible form. |
int |
stackPopCount(ClassFile classFile)
Returns the number of entries popped from the stack during the execution of the instruction. |
int |
stackPushCount(ClassFile classFile)
Returns the number of entries pushed onto the stack during the execution of the instruction. |
abstract String |
toString(int offset)
Returns a description of the instruction, at the given offset. |
void |
write(CodeAttrInfo codeAttrInfo,
int offset)
Writes the Instruction back to the data in the byte array. |
protected static void |
writeByte(byte[] code,
int offset,
int value)
|
protected abstract void |
writeInfo(byte[] code,
int offset)
Writes data following the instruction opcode. |
protected static void |
writeInt(byte[] code,
int offset,
int value)
|
protected static void |
writeShort(byte[] code,
int offset,
int value)
|
protected static void |
writeValue(byte[] code,
int offset,
int value,
int valueSize)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public byte opcode
| Constructor Detail |
public Instruction()
| Method Detail |
public abstract Instruction shrink()
public final void write(CodeAttrInfo codeAttrInfo,
int offset)
protected boolean isWide()
protected abstract void readInfo(byte[] code,
int offset)
protected abstract void writeInfo(byte[] code,
int offset)
public abstract int length(int offset)
public abstract void accept(ClassFile classFile,
MethodInfo methodInfo,
CodeAttrInfo codeAttrInfo,
int offset,
InstructionVisitor instructionVisitor)
public abstract String toString(int offset)
public String getName()
public boolean isCategory2()
public int stackPopCount(ClassFile classFile)
public int stackPushCount(ClassFile classFile)
protected static int readByte(byte[] code,
int offset)
protected static int readShort(byte[] code,
int offset)
protected static int readInt(byte[] code,
int offset)
protected static int readValue(byte[] code,
int offset,
int valueSize)
protected static int readSignedByte(byte[] code,
int offset)
protected static int readSignedShort(byte[] code,
int offset)
protected static int readSignedValue(byte[] code,
int offset,
int valueSize)
protected static void writeByte(byte[] code,
int offset,
int value)
protected static void writeShort(byte[] code,
int offset,
int value)
protected static void writeInt(byte[] code,
int offset,
int value)
protected static void writeValue(byte[] code,
int offset,
int value,
int valueSize)
|
ProGuard | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||