/** * Replaces the instruction at a given offset by a given push instruction * of a constant. */ private void replaceConstantPushInstruction(Clazz clazz, int offset, Instruction instruction, byte replacementOpcode, int value) { Instruction replacementInstruction = new SimpleInstruction(replacementOpcode, value).shrink(); replaceInstruction(clazz, offset, instruction, replacementInstruction); }
codeAttributeComposer.appendInstruction(offset, simpleInstruction.shrink());