Examples of visitTryCatchBlock()


Examples of org.ow2.asm.MethodVisitor.visitTryCatchBlock()

        Label l0 = new Label();
        Label l1 = new Label();
        Label l2 = new Label();
        Label l3 = new Label();
        mv.visitTryCatchBlock(l0, l0, l1, null);
        mv.visitTryCatchBlock(l0, l2, l2, "java/lang/RuntimeException");
        mv.visitLabel(l0);
        mv.visitJumpInsn(JSR, l3);
        mv.visitInsn(RETURN);
        mv.visitLabel(l1);
        mv.visitVarInsn(ASTORE, 1);
View Full Code Here

Examples of org.ow2.asm.MethodVisitor.visitTryCatchBlock()

                    "class$", "(Ljava/lang/String;)Ljava/lang/Class;", null, null);
            mv.visitCode();
            Label l0 = new Label();
            Label l1 = new Label();
            Label l2 = new Label();
            mv.visitTryCatchBlock(l0, l1, l2, "java/lang/ClassNotFoundException");
            mv.visitLabel(l0);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESTATIC,
                    "java/lang/Class",
                    "forName",
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitTryCatchBlock()

            //            }
            //        }
            Label tryLabelStart = new Label();
            Label l1 = new Label();
            Label l2 = new Label();
            mv.visitTryCatchBlock(tryLabelStart, l1, l2, "java/lang/Exception");
            // Add bean (as first argument)
            mv.visitVarInsn(ALOAD, 0);
            // Test if invocation context factory is null
            // If there is no invocation context factory, jump to the end
            mv.visitMethodInsn(INVOKEVIRTUAL, this.classAnnotationMetadata.getClassName(), "getEasyBeansInvocationContextFactory", "()Lorg/ow2/easybeans/api/interceptor/EZBInvocationContextFactory;");
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitTryCatchBlock()

            // Perform try/catch blocks with ASM
            int block = 0;
            // method exception
            if (methodExceptions != null) {
                for (String exception : methodExceptions) {
                    mv.visitTryCatchBlock(tryLabelStart, catchsLabel[0], catchsLabel[block], exception);
                    block++;
                }
            }
            // Exception thrown by proceed() call
            if (!methodAlreadyThrowJavaLangException) {
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitTryCatchBlock()

                    block++;
                }
            }
            // Exception thrown by proceed() call
            if (!methodAlreadyThrowJavaLangException) {
                mv.visitTryCatchBlock(tryLabelStart, catchsLabel[0], catchsLabel[lastCatchBlockLabel], "java/lang/Exception");
            }

            // No invocation context factory end
            mv.visitLabel(labelNoInvocationContextFactory);
        }
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitTryCatchBlock()

        // Perform try/catch blocks with ASM
        int block = 0;
        // method exception
        if (methodExceptions != null) {
            for (String exception : methodExceptions) {
                mv.visitTryCatchBlock(tryLabel, catchsLabel[0], catchsLabel[block], exception);
                block++;
            }
        }
        // Exception thrown by proceed() call
        if (!methodAlreadyThrowJavaLangException) {
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitTryCatchBlock()

                block++;
            }
        }
        // Exception thrown by proceed() call
        if (!methodAlreadyThrowJavaLangException) {
            mv.visitTryCatchBlock(tryLabel, catchsLabel[0], catchsLabel[lastCatchBlockLabel], "java/lang/Exception");
        }

        mv.visitMaxs(0, 0);
        mv.visitEnd();
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitTryCatchBlock()

            mv.visitLabel(notNullParametersLabel);
            mv.visitFieldInsn(GETSTATIC, this.generatedClassName, "method", JAVA_LANG_REFLECT_METHOD);
            mv.visitInsn(ARETURN);

            // add try/cacth
            mv.visitTryCatchBlock(tryLabel, firstCatchLabel, firstCatchLabel, "java/lang/SecurityException");
            mv.visitTryCatchBlock(tryLabel, firstCatchLabel, secondCatchLabel, "java/lang/NoSuchMethodException");
        } else {
            // for lifecycle method
            mv.visitInsn(ACONST_NULL);
            mv.visitInsn(ARETURN);
View Full Code Here

Examples of org.ow2.easybeans.asm.MethodVisitor.visitTryCatchBlock()

            mv.visitFieldInsn(GETSTATIC, this.generatedClassName, "method", JAVA_LANG_REFLECT_METHOD);
            mv.visitInsn(ARETURN);

            // add try/cacth
            mv.visitTryCatchBlock(tryLabel, firstCatchLabel, firstCatchLabel, "java/lang/SecurityException");
            mv.visitTryCatchBlock(tryLabel, firstCatchLabel, secondCatchLabel, "java/lang/NoSuchMethodException");
        } else {
            // for lifecycle method
            mv.visitInsn(ACONST_NULL);
            mv.visitInsn(ARETURN);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.