Package org.ow2.easybeans.asm.util

Examples of org.ow2.easybeans.asm.util.TraceMethodVisitor.visitMaxs()


        // instanceof
        mv.visitInsn(ACONST_NULL);
        mv.visitTypeInsn(INSTANCEOF, "java/lang/String");
        // end method
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    private void jumpInsns(final ClassWriter cw) {
        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC,
View Full Code Here


        // many NOPs will be introduced here by the method resizing test
        mv.visitJumpInsn(GOTO, l0);
        mv.visitLabel(l0);

        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitAttribute(new CodeComment());
        mv.visitEnd();

        cw.visitEnd();
        return cw.toByteArray();
View Full Code Here

                "[Lpkg/Enum;",
                "clone",
                "()Ljava/lang/Object;");
        mv.visitTypeInsn(CHECKCAST, "[Lpkg/Enum;");
        mv.visitInsn(ARETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC,
                "valueOf",
                "(Ljava/lang/String;)Lpkg/Enum;",
View Full Code Here

                "java/lang/Enum",
                "valueOf",
                "(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;");
        mv.visitTypeInsn(CHECKCAST, "pkg/Enum");
        mv.visitInsn(ARETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_PRIVATE,
                "<init>",
                "(Ljava/lang/String;I)V",
View Full Code Here

        mv.visitMethodInsn(INVOKESPECIAL,
                "java/lang/Enum",
                "<init>",
                "(Ljava/lang/String;I)V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_STATIC, "<clinit>", "()V", null, null);
        mv.visitCode();
        mv.visitTypeInsn(NEW, "pkg/Enum");
View Full Code Here

        Label l = new Label();

        mv.visitLocalVariable("boo", "LBoo;", null, l, l, 1);
        mv.visitLocalVariable("boo1", "[LBoo;", null, l, l, 3);
        mv.visitLocalVariable("boo2", "[[LBoo;", null, l, l, 4);
        mv.visitMaxs(0, 0);
       
        mv.visitTryCatchBlock(l, l, l, "Coo");
       
        mv.visitEnd();
       
View Full Code Here

        mv.visitInsn(ICONST_2);
        mv.visitFieldInsn(GETSTATIC, "pkg/Enum", "V2", "Lpkg/Enum;");
        mv.visitInsn(AASTORE);
        mv.visitFieldInsn(PUTSTATIC, "pkg/Enum", "$VALUES", "[Lpkg/Enum;");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        cw.visitEnd();

        return cw.toByteArray();
View Full Code Here

        mv.visitMethodInsn(INVOKESPECIAL,
                "pkg/FrameTable",
                "<init>",
                "(Ljava/lang/Object;)V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    private void uninitializedLocalType(final ClassWriter cw) {
        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC,
View Full Code Here

                2,
                new Object[] { l0, LONG });
        mv.visitLabel(l2);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Long", "<init>", "(J)V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    private void uninitializedStackType(final ClassWriter cw) {
        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC,
View Full Code Here

        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Long", "<init>", "(J)V");
        mv.visitFrame(F_SAME1, 0, null, 1, new Object[] { "java/lang/Long" });
        mv.visitLabel(l2);
        mv.visitVarInsn(ASTORE, 2);
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    private void nullType(final ClassWriter cw) {
        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC,
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.