/** * {@inheritDoc} */ @Override protected void onMethodEnter() { generateBeforeBodyCall(); // start our try block visitLabel(tryBlockStart); }
/** * {@inheritDoc} */ @Override public void visitMaxs(int maxStack, int maxLocals) { // the definition of the end of the try block Label tryBlockEnd = new Label(); visitLabel(tryBlockEnd); // setup for the finally block super.visitTryCatchBlock(tryBlockStart, tryBlockEnd, finallyHandler, null); visitLabel(finallyHandler); // only generate the throw in body if exception sensor is active if (enhancedExceptionSensor) { // duplicate exception and call dup(); generateThrowInBodyCall(); } // generate code for calling first and second // push exception as we don't have a result dup(); dup(); // add true booleans to denote exception in the call generateAfterBodyCall("dispatchFirstMethodAfterBody", true); generateAfterBodyCall("dispatchSecondMethodAfterBody", true); mv.visitInsn(ATHROW); // update the max stack stuff super.visitMaxs(maxStack, maxLocals); }