Package org.ow2.easybeans.asm

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


        Label l14 = new Label();
        mv.visitLabel(l14);
        mv.visitVarInsn(ALOAD, THREE);
        mv.visitMethodInsn(INVOKEVIRTUAL, "org/ow2/easybeans/rpc/ClientRPCInvocationHandler", "getBeanId",
                "()Ljava/lang/Long;");
        mv.visitVarInsn(ASTORE, FIVE);
        Label l15 = new Label();
        mv.visitLabel(l15);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classAnnotationMetadata.getClassName(), "getEasyBeansFactory",
                "()Lorg/ow2/easybeans/api/Factory;");
View Full Code Here


        mv.visitMethodInsn(INVOKEVIRTUAL, "org/ow2/easybeans/rpc/ClientRPCInvocationHandler", "getBeanId",
                "()Ljava/lang/Long;");
        mv.visitVarInsn(ASTORE, FIVE);
        Label l15 = new Label();
        mv.visitLabel(l15);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classAnnotationMetadata.getClassName(), "getEasyBeansFactory",
                "()Lorg/ow2/easybeans/api/Factory;");
        mv.visitMethodInsn(INVOKEINTERFACE, "org/ow2/easybeans/api/Factory", "getClassName", "()Ljava/lang/String;");
        Label l16 = new Label();
        mv.visitLabel(l16);
View Full Code Here

        mv.visitMethodInsn(INVOKEVIRTUAL, classAnnotationMetadata.getClassName(), "getEasyBeansFactory",
                "()Lorg/ow2/easybeans/api/Factory;");
        mv.visitMethodInsn(INVOKEINTERFACE, "org/ow2/easybeans/api/Factory", "getClassName", "()Ljava/lang/String;");
        Label l16 = new Label();
        mv.visitLabel(l16);
        mv.visitVarInsn(ALOAD, FOUR);
        mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z");
        Label l17 = new Label();
        mv.visitJumpInsn(IFEQ, l17);
        Label l18 = new Label();
        mv.visitLabel(l18);
View Full Code Here

        mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z");
        Label l17 = new Label();
        mv.visitJumpInsn(IFEQ, l17);
        Label l18 = new Label();
        mv.visitLabel(l18);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classAnnotationMetadata.getClassName(), "getEasyBeansStatefulID", "()Ljava/lang/Long;");
        mv.visitVarInsn(ALOAD, FIVE);
        mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Long", "equals", "(Ljava/lang/Object;)Z");
        mv.visitJumpInsn(IFEQ, l17);
        mv.visitInsn(ICONST_1);
View Full Code Here

        mv.visitJumpInsn(IFEQ, l17);
        Label l18 = new Label();
        mv.visitLabel(l18);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classAnnotationMetadata.getClassName(), "getEasyBeansStatefulID", "()Ljava/lang/Long;");
        mv.visitVarInsn(ALOAD, FIVE);
        mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Long", "equals", "(Ljava/lang/Object;)Z");
        mv.visitJumpInsn(IFEQ, l17);
        mv.visitInsn(ICONST_1);
        mv.visitInsn(IRETURN);
        mv.visitLabel(l17);
View Full Code Here

        // Generate constructor
        MethodVisitor mv = getCW().visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitCode();

        // Call super constructor
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");

        // Build instance of interceptors
        for (String interceptor : this.allInterceptors) {
            mv.visitVarInsn(ALOAD, 0);
View Full Code Here

        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");

        // Build instance of interceptors
        for (String interceptor : this.allInterceptors) {
            mv.visitVarInsn(ALOAD, 0);
            mv.visitTypeInsn(NEW, interceptor);
            mv.visitInsn(DUP);
            mv.visitMethodInsn(INVOKESPECIAL, interceptor, "<init>", "()V");
            mv.visitFieldInsn(PUTFIELD, this.generatedClassName, getField(interceptor), encodeClassDesc(interceptor));
        }
View Full Code Here

    private void addGetterMethods() {
        for (String interceptor : this.allInterceptors) {
            MethodVisitor mv = getCW().visitMethod(ACC_PUBLIC, getMethod(interceptor),
                    "()" + encodeClassDesc(interceptor), null, null);
            mv.visitCode();
            mv.visitVarInsn(ALOAD, 0);
            mv.visitFieldInsn(GETFIELD, this.generatedClassName, getField(interceptor), encodeClassDesc(interceptor));
            mv.visitInsn(ARETURN);
            mv.visitMaxs(0, 0);
            mv.visitEnd();
        }
View Full Code Here

            // Set also the bean's context and its factory.
            if (this.ejbJarAnnotationMetadata.getScannedClassMetadata(interceptor) != null) {
                String fieldName = getField(interceptor);

                // interceptor.setEasyBeansContext(easyBeansContext);
                mv.visitVarInsn(ALOAD, 0);
                mv.visitFieldInsn(GETFIELD, this.generatedClassName, fieldName, encodeClassDesc(interceptor));
                mv.visitVarInsn(ALOAD, 0);
                mv.visitFieldInsn(GETFIELD, this.generatedClassName, "easyBeansContext",
                        EZB_EJBCONTEXT_DESC);
                mv.visitMethodInsn(INVOKEVIRTUAL, interceptor, "setEasyBeansContext",
View Full Code Here

                String fieldName = getField(interceptor);

                // interceptor.setEasyBeansContext(easyBeansContext);
                mv.visitVarInsn(ALOAD, 0);
                mv.visitFieldInsn(GETFIELD, this.generatedClassName, fieldName, encodeClassDesc(interceptor));
                mv.visitVarInsn(ALOAD, 0);
                mv.visitFieldInsn(GETFIELD, this.generatedClassName, "easyBeansContext",
                        EZB_EJBCONTEXT_DESC);
                mv.visitMethodInsn(INVOKEVIRTUAL, interceptor, "setEasyBeansContext",
                        "(" + EZB_EJBCONTEXT_DESC + ")V");
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.