addOpcode(int opcode) Add an opcode to the byte array, adjusting for 4-byte alignment for
switch instructions and saving the index for calculating branches.
public void
addShort(int i) Adds a 2-byte short to the array, high byte first.
public byte[]
array() Returns the byte array after resolving branches.
public int
labelIndex(Label label) Returns the index in the byte array of the given label.
public int
maxLocals() Returns the maximum number of local variables used by this method.
public int
maxStack() Returns the maximum height of the stack at any point in this method.
Create the byte array for a method.
Parameters: method - The method being edited. Parameters: constants - The constant pool of the class. Parameters: insts - A List of Instructions and Labels to convert to a byte array. See Also:MethodEditor See Also:ConstantPool See Also:Instruction See Also:Label
Add an opcode to the byte array, adjusting for 4-byte alignment for
switch instructions and saving the index for calculating branches.
Parameters: opcode - The opcode. See Also:Opcode