public int[] matchedJumpOffsets(int offset, int[] jumpOffsets) { int[] matchedJumpOffsets = new int[jumpOffsets.length]; for (int index = 0; index < jumpOffsets.length; index++) { matchedJumpOffsets[index] = matchedBranchOffset(offset, jumpOffsets[index]); } return matchedJumpOffsets; }
/** * Returns the values of the specified matched jump offsets (wildcard or * not). */ public int[] matchedJumpOffsets(int offset, int[] jumpOffsets) { int[] matchedJumpOffsets = new int[jumpOffsets.length]; for (int index = 0; index < jumpOffsets.length; index++) { matchedJumpOffsets[index] = matchedBranchOffset(offset, jumpOffsets[index]); } return matchedJumpOffsets; }
/** * Returns the values of the specified matched jump offsets (wildcard or * not). */ public int[] matchedJumpOffsets(int offset, int[] jumpOffsets) { int[] matchedJumpOffsets = new int[jumpOffsets.length]; for (int index = 0; index < jumpOffsets.length; index++) { matchedJumpOffsets[index] = matchedBranchOffset(offset, jumpOffsets[index]); } return matchedJumpOffsets; }
/** * Returns the values of the specified matched jump offsets (wildcard or * not). */ public int[] matchedJumpOffsets(int offset, int[] jumpOffsets) { int[] matchedJumpOffsets = new int[jumpOffsets.length]; for (int index = 0; index < jumpOffsets.length; index++) { matchedJumpOffsets[index] = matchedBranchOffset(offset, jumpOffsets[index]); } return matchedJumpOffsets; }
public void visitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction) { replacementInstruction = new BranchInstruction(branchInstruction.opcode, instructionSequenceMatcher.matchedBranchOffset(offset, branchInstruction.branchOffset)); }
/** * Returns the value of the specified matched branch offset. */ protected int matchedBranchOffset(int offset, int branchOffset) { // Special case: is it a label? if (isLabel(branchOffset)) { // Then make sure we reference a unique label, because // there may be other matching sequences. return uniqueLabel(branchOffset); } // Otherwise, just return the matched branch offset. return instructionSequenceMatcher.matchedBranchOffset(offset, branchOffset); }
/** * Returns the value of the specified matched branch offset. */ protected int matchedBranchOffset(int offset, int branchOffset) { // Special case: is it a label? if (isLabel(branchOffset)) { // Then make sure we reference a unique label, because // there may be other matching sequences. return uniqueLabel(branchOffset); } // Otherwise, just return the matched branch offset. return instructionSequenceMatcher.matchedBranchOffset(offset, branchOffset); }
/** * Returns the value of the specified matched branch offset. */ protected int matchedBranchOffset(int offset, int branchOffset) { // Special case: is it a label? if (isLabel(branchOffset)) { // Then make sure we reference a unique label, because // there may be other matching sequences. return uniqueLabel(branchOffset); } // Otherwise, just return the matched branch offset. return instructionSequenceMatcher.matchedBranchOffset(offset, branchOffset); }
public void visitLookUpSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LookUpSwitchInstruction lookUpSwitchInstruction) { replacementInstruction = new LookUpSwitchInstruction(lookUpSwitchInstruction.opcode, instructionSequenceMatcher.matchedBranchOffset(offset, lookUpSwitchInstruction.defaultOffset), instructionSequenceMatcher.matchedArguments(lookUpSwitchInstruction.cases), instructionSequenceMatcher.matchedJumpOffsets(offset, lookUpSwitchInstruction.jumpOffsets)); } }
public void visitTableSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, TableSwitchInstruction tableSwitchInstruction) { replacementInstruction = new TableSwitchInstruction(tableSwitchInstruction.opcode, instructionSequenceMatcher.matchedBranchOffset(offset, tableSwitchInstruction.defaultOffset), instructionSequenceMatcher.matchedArgument(tableSwitchInstruction.lowCase), instructionSequenceMatcher.matchedArgument(tableSwitchInstruction.highCase), instructionSequenceMatcher.matchedJumpOffsets(offset, tableSwitchInstruction.jumpOffsets)); }