Examples of visitCode()


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

    checkMethod(tmv);
  }

  protected void checkMethod(TraceMethodVisitor tmv) {
    TraceMethodVisitor mv = new TraceMethodVisitor(null);
    mv.visitCode();
    mv.visitVarInsn(ILOAD, 1);
    mv.visitInsn(IRETURN);
    mv.visitMaxs(0, 0);
    mv.visitEnd();
    assertEquals(mv, tmv);
View Full Code Here

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

        fv = cw.visitField(ACC_PRIVATE + ACC_DEPRECATED, "i", "I", null, null);
        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();
View Full Code Here

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

        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_DEPRECATED, "m", "()V", null, null);
        mv.visitCode();
        mv.visitTypeInsn(NEW, "pkg/Outer$1");
        mv.visitInsn(DUP);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL,
                "pkg/Outer$1",
View Full Code Here

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

        mv = cw.visitMethod(ACC_STATIC + ACC_SYNTHETIC,
                "access$000",
                "(Lpkg/Outer;)I",
                null,
                null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitFieldInsn(GETFIELD, "pkg/Outer", "i", "I");
        mv.visitInsn(IRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
View Full Code Here

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

                null,
                null);
        fv.visitEnd();

        mv = cw.visitMethod(0, "<init>", "(Lpkg/Outer;)V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitFieldInsn(PUTFIELD, "pkg/Outer$1", "this$0", "Lpkg/Outer;");
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "pkg/Outer", "<init>", "()V");
View Full Code Here

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

        mv = cw.visitMethod(ACC_PUBLIC,
                "toString",
                "()Ljava/lang/String;",
                null,
                null);
        mv.visitCode();
        mv.visitTypeInsn(NEW, "java/lang/StringBuilder");
        mv.visitInsn(DUP);
        mv.visitMethodInsn(INVOKESPECIAL,
                "java/lang/StringBuilder",
                "<init>",
View Full Code Here

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

                null,
                null);
        fv.visitEnd();

        mv = cw.visitMethod(0, "<init>", "(Lpkg/Outer;)V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitFieldInsn(PUTFIELD, "pkg/Outer$Inner", "this$0", "Lpkg/Outer;");
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
View Full Code Here

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

        MethodVisitor mv;

        cw.visit(V1_1, ACC_PUBLIC, "pkg/JSR1", null, "java/lang/Object", null);

        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();
View Full Code Here

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

        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();

        mv = cw.visitMethod(ACC_PUBLIC, "forwardJSR", "([I)V", null, null);
        mv.visitCode();
        Label l0 = new Label();
        Label l1 = new Label();
        Label l2 = new Label();
        Label l3 = new Label();
        Label l4 = new Label();
View Full Code Here

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

        mv.visitParameterAnnotation(8, DEPRECATED, true).visitEnd();
        // invisible parameter annotation
        av0 = mv.visitParameterAnnotation(8, "Lpkg/Annotation;", false);
        av0.visitArray("stringArrayValue").visitEnd();
        av0.visitEnd();
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
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.