int catchNum = aTry.getCatchHandlerIndex(); TryCatchBlock catchBlock = catches.get(catchNum); int offset = aTry.getStartAddress(); int end = offset + aTry.getInstructionCount() - 1;
private Try[] readTries(int triesSize, CatchHandler[] catchHandlers) { Try[] result = new Try[triesSize]; for (int i = 0; i < triesSize; i++) { int startAddress = readInt(); int instructionCount = readUnsignedShort(); int handlerOffset = readUnsignedShort(); int catchHandlerIndex = findCatchHandlerIndex(catchHandlers, handlerOffset); result[i] = new Try(startAddress, instructionCount, catchHandlerIndex); } return result; }
private void transformTries(Dex.Section out, Code.Try[] tries, int[] catchHandlerOffsets) { for (Code.Try tryItem : tries) { out.writeInt(tryItem.getStartAddress()); out.writeUnsignedShort(tryItem.getInstructionCount()); out.writeUnsignedShort(catchHandlerOffsets[tryItem.getCatchHandlerIndex()]); } }
private void transformTries(Dex.Section out, Code.Try[] tries, int[] catchHandlerOffsets) { for (Code.Try tryItem : tries) { out.writeInt(tryItem.getStartAddress()); out.writeUnsignedShort(tryItem.getInstructionCount()); out.writeUnsignedShort(catchHandlerOffsets[tryItem.getCatchHandlerIndex()]); } }
private Try[] readTries(int triesSize, CatchHandler[] catchHandlers) { Try[] result = new Try[triesSize]; for (int i = 0; i < triesSize; i++) { int startAddress = readInt(); int instructionCount = readUnsignedShort(); int handlerOffset = readUnsignedShort(); int catchHandlerIndex = findCatchHandlerIndex(catchHandlers, handlerOffset); result[i] = new Try(startAddress, instructionCount, catchHandlerIndex); } return result; }
private void transformTries(Dex.Section out, Code.Try[] tries, int[] catchHandlerOffsets) { for (Code.Try tryItem : tries) { out.writeInt(tryItem.getStartAddress()); out.writeUnsignedShort(tryItem.getInstructionCount()); out.writeUnsignedShort(catchHandlerOffsets[tryItem.getCatchHandlerIndex()]); } }
private Try[] readTries(int triesSize, CatchHandler[] catchHandlers) { Try[] result = new Try[triesSize]; for (int i = 0; i < triesSize; i++) { int startAddress = readInt(); int instructionCount = readUnsignedShort(); int handlerOffset = readUnsignedShort(); int catchHandlerIndex = findCatchHandlerIndex(catchHandlers, handlerOffset); result[i] = new Try(startAddress, instructionCount, catchHandlerIndex); } return result; }