public static class CodeAttributeEditor.Label extends Instruction
| Modifier and Type | Field and Description |
|---|---|
protected int |
identifier |
opcode| Constructor and Description |
|---|
Label(int identifier)
Creates a new Label.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Clazz clazz,
Method method,
CodeAttribute codeAttribute,
int offset,
InstructionVisitor instructionVisitor)
Accepts the given visitor.
|
int |
length(int offset)
Returns the length in bytes of the instruction.
|
int |
offset()
Returns the offset that can then be used as a branch target in
other replacement instructions.
|
protected void |
readInfo(byte[] code,
int offset)
Reads the data following the instruction opcode.
|
Instruction |
shrink()
Shrinks this instruction to its shortest possible form.
|
String |
toString() |
void |
write(byte[] code,
int offset)
Writes the Instruction at the given offset in the given code array.
|
protected void |
writeInfo(byte[] code,
int offset)
Writes data following the instruction opcode.
|
actualOpcode, canonicalOpcode, getName, isCategory2, isWide, mayThrowExceptions, readByte, readInt, readShort, readSignedByte, readSignedShort, readSignedValue, readValue, stackPopCount, stackPushCount, toString, write, writeByte, writeInt, writeShort, writeSignedByte, writeSignedShort, writeSignedValue, writeValuepublic Label(int identifier)
identifier - an identifier that can be chosen freely.public int offset()
public Instruction shrink()
Instructionshrink in class Instructionpublic void write(byte[] code,
int offset)
Instructionwrite in class Instructionprotected void readInfo(byte[] code,
int offset)
InstructionreadInfo in class Instructionprotected void writeInfo(byte[] code,
int offset)
InstructionwriteInfo in class Instructionpublic int length(int offset)
Instructionlength in class Instructionpublic void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, InstructionVisitor instructionVisitor)
Instructionaccept in class InstructionCopyright © 2019. All rights reserved.