return null; } else { firstHandler.nextHandler = removeRange(firstHandler.nextHandler, start, end); } else { return new Handler(firstHandler, end, firstHandler.endPc); return new Handler(firstHandler, firstHandler.startPc, start); } else { firstHandler.nextHandler = new Handler(firstHandler, end, firstHandler.endPc); return new Handler(firstHandler, firstHandler.startPc, start);
/** * Returns the size in bytes of the JVMS exception_table corresponding to the Handler list that * begins with the given element. <i>This includes the exception_table_length field.</i> * * @param firstHandler the beginning of a Handler list. May be {@literal null}. * @return the size in bytes of the exception_table_length and exception_table structures. */ static int getExceptionTableSize(final Handler firstHandler) { return 2 + 8 * getExceptionTableLength(firstHandler); }
int size = 10 + code.length + Handler.getExceptionTableSize(firstHandler); int codeAttributeCount = 0; if (stackMapTableEntries != null) { .putInt(code.length) .putByteArray(code.data, 0, code.length); Handler.putExceptionTable(firstHandler, output); output.putShort(codeAttributeCount); if (stackMapTableEntries != null) {
@Override public void visitTryCatchBlock( final Label start, final Label end, final Label handler, final String type) { Handler newHandler = new Handler( start, end, handler, type != null ? symbolTable.addConstantClass(type).index : 0, type); if (firstHandler == null) { firstHandler = newHandler; } else { lastHandler.nextHandler = newHandler; } lastHandler = newHandler; }
visitFrameEnd(); firstHandler = Handler.removeRange(firstHandler, basicBlock, nextBasicBlock);
size += 16 + code.length + Handler.getExceptionTableSize(firstHandler); if (stackMapTableEntries != null) { boolean useStackMapTable = symbolTable.getMajorVersion() >= Opcodes.V1_6;
int size = 10 + code.length + Handler.getExceptionTableSize(firstHandler); int codeAttributeCount = 0; if (stackMapTableEntries != null) { .putInt(code.length) .putByteArray(code.data, 0, code.length); Handler.putExceptionTable(firstHandler, output); output.putShort(codeAttributeCount); if (stackMapTableEntries != null) {
@Override public void visitTryCatchBlock( final Label start, final Label end, final Label handler, final String type) { Handler newHandler = new Handler( start, end, handler, type != null ? symbolTable.addConstantClass(type).index : 0, type); if (firstHandler == null) { firstHandler = newHandler; } else { lastHandler.nextHandler = newHandler; } lastHandler = newHandler; }
visitFrameEnd(); firstHandler = Handler.removeRange(firstHandler, basicBlock, nextBasicBlock);
size += 16 + code.length + Handler.getExceptionTableSize(firstHandler); if (stackMapTableEntries != null) { boolean useStackMapTable = symbolTable.getMajorVersion() >= Opcodes.V1_6;
return null; } else { firstHandler.nextHandler = removeRange(firstHandler.nextHandler, start, end); } else { return new Handler(firstHandler, end, firstHandler.endPc); return new Handler(firstHandler, firstHandler.startPc, start); } else { firstHandler.nextHandler = new Handler(firstHandler, end, firstHandler.endPc); return new Handler(firstHandler, firstHandler.startPc, start);
/** * Puts the JVMS exception_table corresponding to the Handler list that begins with the given * element. <i>This includes the exception_table_length field.</i> * * @param firstHandler the beginning of a Handler list. May be {@literal null}. * @param output where the exception_table_length and exception_table structures must be put. */ static void putExceptionTable(final Handler firstHandler, final ByteVector output) { output.putShort(getExceptionTableLength(firstHandler)); Handler handler = firstHandler; while (handler != null) { output .putShort(handler.startPc.bytecodeOffset) .putShort(handler.endPc.bytecodeOffset) .putShort(handler.handlerPc.bytecodeOffset) .putShort(handler.catchType); handler = handler.nextHandler; } } }
/** * Returns the size in bytes of the JVMS exception_table corresponding to the Handler list that * begins with the given element. <i>This includes the exception_table_length field.</i> * * @param firstHandler the beginning of a Handler list. May be {@literal null}. * @return the size in bytes of the exception_table_length and exception_table structures. */ static int getExceptionTableSize(final Handler firstHandler) { return 2 + 8 * getExceptionTableLength(firstHandler); }
/** * Puts the JVMS exception_table corresponding to the Handler list that begins with the given * element. <i>This includes the exception_table_length field.</i> * * @param firstHandler the beginning of a Handler list. May be {@literal null}. * @param output where the exception_table_length and exception_table structures must be put. */ static void putExceptionTable(final Handler firstHandler, final ByteVector output) { output.putShort(getExceptionTableLength(firstHandler)); Handler handler = firstHandler; while (handler != null) { output .putShort(handler.startPc.bytecodeOffset) .putShort(handler.endPc.bytecodeOffset) .putShort(handler.handlerPc.bytecodeOffset) .putShort(handler.catchType); handler = handler.nextHandler; } } }