Package org.ow2.asm

Examples of org.ow2.asm.Label


    public void testIllegalTableSwitchParameters1() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitTableSwitchInsn(1, 0, new Label(), new Label[0]);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here


    public void testIllegalTableSwitchParameters3() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitTableSwitchInsn(0, 1, new Label(), (Label[])null);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

    public void testIllegalTableSwitchParameters4() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitTableSwitchInsn(0, 1, new Label(), new Label[0]);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

    public void testIllegalLookupSwitchParameters1() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitLookupSwitchInsn(new Label(), null, new Label[0]);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

    public void testIllegalLookupSwitchParameters2() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitLookupSwitchInsn(new Label(), new int[0], null);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

    public void testIllegalLookupSwitchParameters3() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitLookupSwitchInsn(new Label(), new int[0], new Label[1]);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

    }

    public void testIllegalTryCatchBlock() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        Label m = new Label();
        Label n = new Label();
        mv.visitLabel(m);
        try {
            mv.visitTryCatchBlock(m, n, n, null);
            fail();
        } catch (Exception e) {
View Full Code Here

    }

    public void testIllegalLocalVariableLabels() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        Label m = new Label();
        Label n = new Label();
        mv.visitLabel(n);
        mv.visitInsn(NOP);
        mv.visitLabel(m);
        try {
            mv.visitLocalVariable("i", "I", null, m, n, 0);
View Full Code Here

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

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

        mv = cw.visitMethod(ACC_PUBLIC, "wideLocals", "(I)I", null, null);
        mv.visitCode();
        Label l0 = new Label();
        Label l1 = new Label();
        mv.visitJumpInsn(GOTO, l1); // will give GOTO_W

        mv.visitLabel(l0);
        mv.visitIincInsn(300, 1); // covers 'update maxlocals' in MethodWriter
        mv.visitVarInsn(ILOAD, 300); // will give wide form
View Full Code Here

TOP

Related Classes of org.ow2.asm.Label

Copyright © 2018 www.massapicom. 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.