Examples of visitMethodInsn()


Examples of org.objectweb.asm.MethodVisitor.visitMethodInsn()

            // END super()
        } else {
            // GENERATE super(target)
            methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);
            methodVisitor.visitVarInsn(Opcodes.ALOAD, 1);
            methodVisitor.visitMethodInsn(Opcodes.INVOKESPECIAL, superclassType.getInternalName(), "<init>",
                    Type.getMethodDescriptor(Type.VOID_TYPE, new Type[]{superclassType}));
            // END super(target)
        }

        // GENERATE helper = new ExceptionHelper(this, target, source, lineNumber)
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitMethodInsn()

        methodVisitor.visitInsn(Opcodes.DUP);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 1);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 2);
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 3);
        methodVisitor.visitMethodInsn(Opcodes.INVOKESPECIAL, helperType.getInternalName(), "<init>",
                Type.getMethodDescriptor(Type.VOID_TYPE, new Type[]{throwableType, throwableType, scriptSourceType, integerType}));

        methodVisitor.visitFieldInsn(Opcodes.PUTFIELD, generatedType.getInternalName(), "helper",
                helperType.getDescriptor());
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitMethodInsn()

            methodVisitor.visitCode();

            methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);
            methodVisitor.visitFieldInsn(Opcodes.GETFIELD, generatedType.getInternalName(), "helper",
                    helperType.getDescriptor());
            methodVisitor.visitMethodInsn(Opcodes.INVOKEVIRTUAL, helperType.getInternalName(), method.getName(),
                    methodDescriptor);

            methodVisitor.visitInsn(Opcodes.ARETURN);
            methodVisitor.visitMaxs(0, 0);
            methodVisitor.visitEnd();
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitMethodInsn()

                new String[0]);
        methodVisitor.visitCode();

        // super()
        methodVisitor.visitVarInsn(Opcodes.ALOAD, 0);
        methodVisitor.visitMethodInsn(Opcodes.INVOKESPECIAL, superclassType.getInternalName(), "<init>",
                constructorDescriptor);

        methodVisitor.visitInsn(Opcodes.RETURN);
        methodVisitor.visitMaxs(0, 0);
        methodVisitor.visitEnd();
View Full Code Here

Examples of org.objectweb.asm.commons.AnalyzerAdapter.visitMethodInsn()

        "(Ljava/lang/Integer;)I", rc);
    rc.aa = aa;
    aa.visitCode();
    aa.visitVarInsn(ALOAD, 1);
    aa.visitTypeInsn(CHECKCAST, "java/lang/Number");
    aa.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Number", "intValue",
        "()I");
    aa.visitInsn(IRETURN);
    aa.visitMaxs(1, 2);
    aa.visitEnd();
    checkMethod(tmv);
View Full Code Here

Examples of org.objectweb.asm.commons.GeneratorAdapter.visitMethodInsn()

        mv.visitFieldInsn(GETFIELD, m_outer, getMethodFlagName(name, desc), "Z");
        mv.visitJumpInsn(IFNE, l0);

        mv.visitVarInsn(ALOAD, 0);
        mv.loadArgs();
        mv.visitMethodInsn(INVOKESPECIAL, m_name, ClassManipulator.PREFIX + name, desc, false);
        mv.visitInsn(returnType.getOpcode(IRETURN));

        // end of the non intercepted method invocation.

        mv.visitLabel(l0);
View Full Code Here

Examples of org.objectweb.asm.tree.MethodNode.visitMethodInsn()

    mn.visitJumpInsn(GOTO, end);
    mn.visitLabel(label);
    mn.visitFrame(F_SAME, 0, null, 0, null);
    mn.visitTypeInsn(NEW, "java/lang/IllegalArgumentException");
    mn.visitInsn(DUP);
    mn.visitMethodInsn(INVOKESPECIAL,
        "java/lang/IllegalArgumentException", "<init>", "()V");
    mn.visitInsn(ATHROW);
    mn.visitLabel(end);
    mn.visitFrame(F_SAME, 0, null, 0, null);
    mn.visitInsn(RETURN);
View Full Code Here

Examples of org.objectweb.asm.util.TraceMethodVisitor.visitMethodInsn()

    mv.visitInsn(RETURN);
    mv.visitLabel(label);
    mv.visitFrame(F_SAME, 0, null, 0, null);
    mv.visitTypeInsn(NEW, "java/lang/IllegalArgumentException");
    mv.visitInsn(DUP);
    mv.visitMethodInsn(INVOKESPECIAL,
        "java/lang/IllegalArgumentException", "<init>", "()V");
    mv.visitInsn(ATHROW);
    mv.visitLabel(new Label());
    mv.visitMaxs(2, 2);
    mv.visitEnd();
View Full Code Here

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

        fv.visitEnd();

        mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_DEPRECATED, "m", "()V", null, null);
View Full Code Here

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

        //            this.easyBeansDynamicInterceptorManager.setEasyBeansContext(getEasyBeansContext());
        //            this.easyBeansDynamicInterceptorManager.injectedByEasyBeans();
        //        }
        if (this.classAnnotationMetadata.isBean()) {
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKEVIRTUAL, this.classAnnotationMetadata.getClassName(), "getEasyBeansInvocationContextFactory",
            "()Lorg/ow2/easybeans/api/interceptor/EZBInvocationContextFactory;");
            Label l1 = new Label();
            mv.visitJumpInsn(IFNULL, l1);

            mv.visitVarInsn(ALOAD, 0);
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.