Package org.ow2.asm

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


        // lookupswitch
        Label l4 = new Label();
        Label l5 = new Label();
        Label l6 = new Label();
        mv.visitVarInsn(ILOAD, 1);
        mv.visitLookupSwitchInsn(l6, new int[] { 0, 1, 2 }, new Label[] {
            l4,
            l5,
            l6 });
        mv.visitLabel(l4);
        mv.visitInsn(ICONST_1);
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

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.