/** * Writes the Instruction at the given offset in the given code attribute. */ public final void write(CodeAttribute codeAttribute, int offset) { write(codeAttribute.code, offset); }
/** * Writes the Instruction at the given offset in the given code attribute. */ public final void write(CodeAttribute codeAttribute, int offset) { write(codeAttribute.code, offset); }
/** * Writes the Instruction at the given offset in the given code attribute. */ public final void write(CodeAttribute codeAttribute, int offset) { write(codeAttribute.code, offset); }
/** * Writes the Instruction at the given offset in the given code attribute. */ public final void write(CodeAttribute codeAttribute, int offset) { write(codeAttribute.code, offset); }
/** * Modifies the given code without updating any offsets. * @param codeAttribute the code to be changed. */ private void performSimpleReplacements(CodeAttribute codeAttribute) { int codeLength = codeAttribute.u4codeLength; // Go over all replacement instructions. for (int offset = 0; offset < codeLength; offset++) { // Overwrite the original instruction with the replacement // instruction if any. Instruction replacementInstruction = replacements[offset]; if (replacementInstruction != null) { replacementInstruction.write(codeAttribute, offset); if (DEBUG) { System.out.println(" Replaced "+replacementInstruction.toString(newOffset)); } } } }
/** * Modifies the given code without updating any offsets. * @param codeAttribute the code to be changed. */ private void performSimpleReplacements(CodeAttribute codeAttribute) { int codeLength = codeAttribute.u4codeLength; // Go over all replacement instructions. for (int offset = 0; offset < codeLength; offset++) { // Overwrite the original instruction with the replacement // instruction if any. Instruction replacementInstruction = replacements[offset]; if (replacementInstruction != null) { replacementInstruction.write(codeAttribute, offset); if (DEBUG) { System.out.println(" Replaced "+replacementInstruction.toString(offset)); } } } }
/** * Modifies the given code without updating any offsets. * @param codeAttribute the code to be changed. */ private void performSimpleReplacements(CodeAttribute codeAttribute) { int codeLength = codeAttribute.u4codeLength; // Go over all replacement instructions. for (int offset = 0; offset < codeLength; offset++) { // Overwrite the original instruction with the replacement // instruction if any. Instruction replacementInstruction = replacements[offset]; if (replacementInstruction != null) { replacementInstruction.write(codeAttribute, offset); if (DEBUG) { System.out.println(" Replaced "+replacementInstruction.toString(offset)); } } } }
/** * Modifies the given code without updating any offsets. * @param codeAttribute the code to be changed. */ private void performSimpleReplacements(CodeAttribute codeAttribute) { int codeLength = codeAttribute.u4codeLength; // Go over all replacement instructions. for (int offset = 0; offset < codeLength; offset++) { // Overwrite the original instruction with the replacement // instruction if any. Instruction replacementInstruction = replacements[offset]; if (replacementInstruction != null) { replacementInstruction.write(codeAttribute, offset); if (DEBUG) { System.out.println(" Replaced "+replacementInstruction.toString(offset)); } } } }
public void write(byte[] code, int offset) { for (int index = 0; index < instructions.length; index++) { Instruction instruction = instructions[index]; instruction.write(code, offset); offset += instruction.length(offset); } }
public void write(byte[] code, int offset) { for (int index = 0; index < instructions.length; index++) { Instruction instruction = instructions[index]; instruction.write(code, offset); offset += instruction.length(offset); } }
public void write(byte[] code, int offset) { for (int index = 0; index < instructions.length; index++) { Instruction instruction = instructions[index]; instruction.write(code, offset); offset += instruction.length(offset); } }
public void write(byte[] code, int offset) { for (int index = 0; index < instructions.length; index++) { Instruction instruction = instructions[index]; instruction.write(code, offset); offset += instruction.length(offset); } }
instruction.write(code, codeLength);
instruction.write(code, instructionOffset);