Package org.ow2.asm

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


            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",
                        "(" + EZB_EJBCONTEXT_DESC + ")V");
View Full Code Here


                // 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");

                // interceptorXX.injectedByEasyBeans();
View Full Code Here

                mv.visitMethodInsn(INVOKEVIRTUAL, interceptor, "setEasyBeansContext",
                        "(" + EZB_EJBCONTEXT_DESC + ")V");

                // interceptorXX.injectedByEasyBeans();
                mv.visitVarInsn(ALOAD, 0);
                mv.visitFieldInsn(GETFIELD, this.generatedClassName, fieldName, encodeClassDesc(interceptor));
                mv.visitMethodInsn(INVOKEVIRTUAL, interceptor, "injectedByEasyBeans", "()V");
            }
        }
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
View Full Code Here

            mv.visitVarInsn(ALOAD, 0);
            // Get the interceptor manager
            mv.visitMethodInsn(INVOKEVIRTUAL, this.classAnnotationMetadata.getClassName(), "getEasyBeansDynamicInterceptorManager", "()Lorg/ow2/easybeans/api/interceptor/EZBInterceptorManager;");

            // Add the interceptor type
            mv.visitFieldInsn(GETSTATIC, Type.getInternalName(InterceptorType.class), interceptorType.toString(), "Lorg/ow2/util/ee/metadata/ejbjar/api/InterceptorType;");
            mv.visitMethodInsn(INVOKEVIRTUAL, Type.getInternalName(InterceptorType.class), "toString", "()Ljava/lang/String;");

            // Signature of the method
            mv.visitLdcInsn(MethodHelper.getSignature(method));
View Full Code Here

        // Now, set the attributes of the class
        // this.bean = bean
        int argBean = arg++;
        mv.visitVarInsn(ALOAD, 0);
        mv.visitVarInsn(ALOAD, argBean);
        mv
                .visitFieldInsn(PUTFIELD, this.generatedClassName, "bean", encodeClassDesc(this.classAnnotationMetadata
                        .getClassName()));


        // this.factory = bean.getEasyBeansFactory();
View Full Code Here

        // this.factory = bean.getEasyBeansFactory();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitVarInsn(ALOAD, argBean);
        mv.visitMethodInsn(INVOKEVIRTUAL, this.classAnnotationMetadata.getClassName(), "getEasyBeansFactory",
                "()Lorg/ow2/easybeans/api/Factory;");
        mv.visitFieldInsn(PUTFIELD, this.generatedClassName, "factory", "Lorg/ow2/easybeans/api/Factory;");


        // this.interceptorManager = bean.getEasyBeansInterceptorManager();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitVarInsn(ALOAD, argBean);
View Full Code Here

        // this.interceptorManager = bean.getEasyBeansInterceptorManager();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitVarInsn(ALOAD, argBean);
        mv.visitMethodInsn(INVOKEVIRTUAL, this.classAnnotationMetadata.getClassName(), "getEasyBeansInterceptorManager",
                "()" + encodeClassDesc(this.interceptorManagerClassName));
        mv.visitFieldInsn(PUTFIELD, this.generatedClassName, "interceptorManager",
                encodeClassDesc(this.interceptorManagerClassName));

        // And now, the attributes corresponding to the arguments of the method
        // it will do : this.ARG0 = xxx;
        int methodArg = 0;
View Full Code Here

        int methodArg = 0;
        for (Type type : this.methodArgsType) {
            mv.visitVarInsn(ALOAD, 0);
            int opCode = putFieldLoadOpCode(type.getSort());
            mv.visitVarInsn(opCode, arg++);
            mv.visitFieldInsn(PUTFIELD, this.generatedClassName, ARG + (methodArg++), type.getDescriptor());
            // Double and Long are special parameters
            if (opCode == LLOAD || opCode == DLOAD) {
                arg++;
            }
        }
View Full Code Here

        for (IJClassInterceptor interceptor : this.allInterceptors) {
            // Only if interceptor is not in the bean class
            if (!interceptor.getClassName().equals(this.beanClassName)) {
                mv.visitVarInsn(ALOAD, 0);
                mv.visitVarInsn(ALOAD, 0);
                mv.visitFieldInsn(GETFIELD, this.generatedClassName, "interceptorManager",
                        encodeClassDesc(this.interceptorManagerClassName));
                String getterName = "get" + interceptor.getClassName().replace("/", "");
                mv.visitMethodInsn(INVOKEVIRTUAL, this.interceptorManagerClassName, getterName, "()"
                        + encodeClassDesc(interceptor.getClassName()));
                mv.visitFieldInsn(PUTFIELD, this.generatedClassName, INTERCEPTOR + (index++), encodeClassDesc(interceptor
View Full Code Here

                mv.visitFieldInsn(GETFIELD, this.generatedClassName, "interceptorManager",
                        encodeClassDesc(this.interceptorManagerClassName));
                String getterName = "get" + interceptor.getClassName().replace("/", "");
                mv.visitMethodInsn(INVOKEVIRTUAL, this.interceptorManagerClassName, getterName, "()"
                        + encodeClassDesc(interceptor.getClassName()));
                mv.visitFieldInsn(PUTFIELD, this.generatedClassName, INTERCEPTOR + (index++), encodeClassDesc(interceptor
                        .getClassName()));
            }
        }

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.