Examples of visitLabel()


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

        mv.visitLabel(l17);
        mv.visitInsn(ICONST_0);
        Label l19 = new Label();
        mv.visitLabel(l19);
        mv.visitInsn(IRETURN);
        mv.visitLabel(l13);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(IRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
View Full Code Here

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

            // Cast and return value
            Type returnType = Type.getReturnType(method.getJMethod().getDescriptor());
            CommonClassGenerator.addReturnType(returnType, mv);
            // if the factory is not null, skip the previous code
            mv.visitLabel(easyBeansFactoryNotNullLabel);
        }



View Full Code Here

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

            mv.visitMethodInsn(INVOKEVIRTUAL, this.classAnnotationMetadata.getClassName(), "getEasyBeansInvocationContextFactory", "()Lorg/ow2/easybeans/api/interceptor/EZBInvocationContextFactory;");
            Label labelNoInvocationContextFactory = new Label();
            mv.visitJumpInsn(IFNULL, labelNoInvocationContextFactory);

            // Begin of the try block
            mv.visitLabel(tryLabelStart);
            mv.visitVarInsn(ALOAD, 0);

            // There is an invocation context factory, get it
            mv.visitMethodInsn(INVOKEVIRTUAL, this.classAnnotationMetadata.getClassName(), "getEasyBeansInvocationContextFactory", "()Lorg/ow2/easybeans/api/interceptor/EZBInvocationContextFactory;");
            mv.visitVarInsn(ALOAD, 0);
View Full Code Here

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

            // Call of proceed method
            mv.visitMethodInsn(INVOKEINTERFACE, "org/ow2/easybeans/api/EasyBeansInvocationContext", "proceed", "()Ljava/lang/Object;");

            // Cast and return value
            CommonClassGenerator.transformObjectIntoPrimitive(returnType, mv);
            mv.visitLabel(l1);
            CommonClassGenerator.addReturnType(returnType, mv);
            mv.visitLabel(l2);


View Full Code Here

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

            // Cast and return value
            CommonClassGenerator.transformObjectIntoPrimitive(returnType, mv);
            mv.visitLabel(l1);
            CommonClassGenerator.addReturnType(returnType, mv);
            mv.visitLabel(l2);




            boolean methodAlreadyThrowJavaLangException = false;
View Full Code Here

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

            } else {
                lastCatchBlockLabel = catchsLabel.length - 1;
            }

            for (int block = 0; block < lastCatchBlockLabel; block++) {
                mv.visitLabel(catchsLabel[block]);
                mv.visitVarInsn(ASTORE, methodArg);
                mv.visitVarInsn(ALOAD, methodArg);
                mv.visitInsn(ATHROW);
            }
            // Now, do the wrapped of Exception into a RuntimeException
View Full Code Here

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

                mv.visitInsn(ATHROW);
            }
            // Now, do the wrapped of Exception into a RuntimeException
            if (!methodAlreadyThrowJavaLangException) {
                // start label
                mv.visitLabel(catchsLabel[lastCatchBlockLabel]);
                mv.visitVarInsn(ASTORE, methodArg);

                // instanceof RuntimeException
                mv.visitVarInsn(ALOAD, methodArg);
                mv.visitTypeInsn(INSTANCEOF, "java/lang/RuntimeException");
View Full Code Here

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

                mv.visitVarInsn(ALOAD, methodArg);
                mv.visitTypeInsn(CHECKCAST, "java/lang/RuntimeException");
                mv.visitInsn(ATHROW);

                // build Runtime exception with given exception
                mv.visitLabel(notInstanceOfRuntimeExceptionLabel);
                mv.visitTypeInsn(NEW, "java/lang/RuntimeException");
                mv.visitInsn(DUP);
                mv.visitVarInsn(ALOAD, methodArg);
                mv.visitMethodInsn(INVOKESPECIAL, "java/lang/RuntimeException", "<init>", "(Ljava/lang/Throwable;)V");
                mv.visitInsn(ATHROW);
View Full Code Here

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

            if (!methodAlreadyThrowJavaLangException) {
                mv.visitTryCatchBlock(tryLabelStart, catchsLabel[0], catchsLabel[lastCatchBlockLabel], "java/lang/Exception");
            }

            // No invocation context factory end
            mv.visitLabel(labelNoInvocationContextFactory);
        }


        // Start of the Try label of Try/Catch
        Label tryLabel = new Label();
View Full Code Here

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

        }


        // Start of the Try label of Try/Catch
        Label tryLabel = new Label();
        mv.visitLabel(tryLabel);

        // build new object by calling the constructor
        mv.visitTypeInsn(NEW, genInvCtx.getGeneratedClassName());
        mv.visitInsn(DUP);
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.