Package org.ow2.easybeans.asm

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


    public void testIllegalByteInsnOperand() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitIntInsn(BIPUSH, Integer.MAX_VALUE);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here


    public void testIllegalShortInsnOperand() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitIntInsn(SIPUSH, Integer.MAX_VALUE);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

    public void testIllegalIntInsnOperand() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitIntInsn(NEWARRAY, 0);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

        for (int i = 1; i < 300; ++i) {
            mv.visitVarInsn(ILOAD, i);
            if (i <= 5) {
                mv.visitInsn(ICONST_0 + i);
            } else if (i <= Byte.MAX_VALUE) {
                mv.visitIntInsn(BIPUSH, i);
            } else {
                mv.visitIntInsn(SIPUSH, i);
            }
            mv.visitInsn(IADD);
            mv.visitVarInsn(ISTORE, i + 1);
View Full Code Here

            if (i <= 5) {
                mv.visitInsn(ICONST_0 + i);
            } else if (i <= Byte.MAX_VALUE) {
                mv.visitIntInsn(BIPUSH, i);
            } else {
                mv.visitIntInsn(SIPUSH, i);
            }
            mv.visitInsn(IADD);
            mv.visitVarInsn(ISTORE, i + 1);
        }
        mv.visitInsn(ICONST_0);
View Full Code Here

        mv.visitInsn(FCONST_0);
        mv.visitInsn(FCONST_1);
        mv.visitInsn(FCONST_2);
        mv.visitInsn(DCONST_0);
        mv.visitInsn(DCONST_1);
        mv.visitIntInsn(BIPUSH, 16);
        mv.visitIntInsn(SIPUSH, 256);
        mv.visitLdcInsn(new Integer(65536));
        mv.visitLdcInsn(new Long(128L));
        mv.visitLdcInsn(new Float("128.0"));
        mv.visitLdcInsn(new Double("128.0"));
View Full Code Here

        mv.visitInsn(FCONST_1);
        mv.visitInsn(FCONST_2);
        mv.visitInsn(DCONST_0);
        mv.visitInsn(DCONST_1);
        mv.visitIntInsn(BIPUSH, 16);
        mv.visitIntInsn(SIPUSH, 256);
        mv.visitLdcInsn(new Integer(65536));
        mv.visitLdcInsn(new Long(128L));
        mv.visitLdcInsn(new Float("128.0"));
        mv.visitLdcInsn(new Double("128.0"));
        mv.visitLdcInsn("\n\r\u0009\"\\");
View Full Code Here

                "()V",
                null,
                null);
        // boolean arrays
        mv.visitInsn(ICONST_1);
        mv.visitIntInsn(NEWARRAY, T_BOOLEAN);
        mv.visitInsn(DUP);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(BASTORE);
        mv.visitInsn(ICONST_0);
View Full Code Here

        mv.visitInsn(BASTORE);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(BALOAD);
        // byte arrays
        mv.visitInsn(ICONST_1);
        mv.visitIntInsn(NEWARRAY, T_BYTE);
        mv.visitInsn(DUP);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(BASTORE);
        mv.visitInsn(ICONST_0);
View Full Code Here

        mv.visitInsn(BASTORE);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(BALOAD);
        // char arrays
        mv.visitInsn(ICONST_1);
        mv.visitIntInsn(NEWARRAY, T_CHAR);
        mv.visitInsn(DUP);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(ICONST_0);
        mv.visitInsn(CASTORE);
        mv.visitInsn(ICONST_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.