Package org.ow2.asm

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


        mv.visitInsn(ACONST_NULL);
        mv.visitInsn(ATHROW);
        // misc instructions to cover code in MethodWriter.resizeInsns
        mv.visitLabel(l0);
        mv.visitInsn(ICONST_1);
        mv.visitInsn(ICONST_2);
        mv.visitMultiANewArrayInsn("[[I", 2);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()V");
        // end method
        mv.visitInsn(RETURN);
View Full Code Here


        mv.visitInsn(ICONST_2);
        mv.visitMultiANewArrayInsn("[[I", 2);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()V");
        // end method
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    private void returnInsns(final ClassWriter cw) {
View Full Code Here

    }

    public void testIllegalMethodInsnVisitBeforeStart() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        try {
            mv.visitInsn(NOP);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

    private void returnInsns(final ClassWriter cw) {
        MethodVisitor mv;
        mv = cw.visitMethod(ACC_STATIC, "ireturnInsn", "()I", null, null);
        mv.visitCode();
        mv.visitInsn(ICONST_0);
        mv.visitInsn(IRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(ACC_PRIVATE, "lreturnInsn", "()J", null, null);
        mv.visitCode();
View Full Code Here

    private void returnInsns(final ClassWriter cw) {
        MethodVisitor mv;
        mv = cw.visitMethod(ACC_STATIC, "ireturnInsn", "()I", null, null);
        mv.visitCode();
        mv.visitInsn(ICONST_0);
        mv.visitInsn(IRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(ACC_PRIVATE, "lreturnInsn", "()J", null, null);
        mv.visitCode();
        mv.visitInsn(LCONST_0);
View Full Code Here

        mv.visitInsn(IRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(ACC_PRIVATE, "lreturnInsn", "()J", null, null);
        mv.visitCode();
        mv.visitInsn(LCONST_0);
        mv.visitInsn(LRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(0, "freturnInsn", "()F", null, null);
        mv.visitCode();
View Full Code Here

        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(ACC_PRIVATE, "lreturnInsn", "()J", null, null);
        mv.visitCode();
        mv.visitInsn(LCONST_0);
        mv.visitInsn(LRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(0, "freturnInsn", "()F", null, null);
        mv.visitCode();
        mv.visitInsn(FCONST_0);
View Full Code Here

        mv.visitInsn(LRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(0, "freturnInsn", "()F", null, null);
        mv.visitCode();
        mv.visitInsn(FCONST_0);
        mv.visitInsn(FRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(0, "dreturnInsn", "()D", null, null);
        mv.visitCode();
View Full Code Here

        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(0, "freturnInsn", "()F", null, null);
        mv.visitCode();
        mv.visitInsn(FCONST_0);
        mv.visitInsn(FRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(0, "dreturnInsn", "()D", null, null);
        mv.visitCode();
        mv.visitInsn(DCONST_0);
View Full Code Here

        mv.visitInsn(FRETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
        mv = cw.visitMethod(0, "dreturnInsn", "()D", null, null);
        mv.visitCode();
        mv.visitInsn(DCONST_0);
        mv.visitInsn(DRETURN);
        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.