Package org.ow2.asm.commons

Examples of org.ow2.asm.commons.EmptyVisitor


        } catch (Exception e) {
        }
    }

    public void testIllegalAnnotationValue() {
        AnnotationVisitor av = new CheckAnnotationAdapter(new EmptyVisitor());
        try {
            av.visit("name", new Object());
            fail();
        } catch (Exception e) {
        }
View Full Code Here


        } catch (Exception e) {
        }
    }

    public void testIllegalAnnotationEnumValue() {
        AnnotationVisitor av = new CheckAnnotationAdapter(new EmptyVisitor());
        try {
            av.visitEnum("name", "Lpkg/Enum;", null);
            fail();
        } catch (Exception e) {
        }
View Full Code Here

        } catch (Exception e) {
        }
    }

    public void testIllegalAnnotationValueAfterEnd() {
        AnnotationVisitor av = new CheckAnnotationAdapter(new EmptyVisitor());
        av.visitEnd();
        try {
            av.visit("name", new Integer(0));
            fail();
        } catch (Exception e) {
View Full Code Here

        } catch (Exception e) {
        }
    }

    public void testIllegalMethodMemberVisitAfterEnd() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitEnd();
        try {
            mv.visitAttribute(new Comment());
            fail();
        } catch (Exception e) {
View Full Code Here

        } catch (Exception e) {
        }
    }

    public void testIllegalMethodAttribute() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        try {
            mv.visitAttribute(null);
            fail();
        } catch (Exception e) {
        }
View Full Code Here

        } catch (Exception e) {
        }
    }

    public void testIllegalMethodSignature() {
        ClassVisitor cv = new CheckClassAdapter(new EmptyVisitor());
        cv.visit(V1_1, ACC_PUBLIC, "C", null, "java/lang/Object", null);
        try {
            cv.visitMethod(ACC_PUBLIC, "m", "()V", "<T::LI.J<*+LA;>;>()V^LA;X", null);
            fail();
        } catch (Exception e) {
View Full Code Here

        } catch (Exception e) {
        }
    }

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

        } catch (Exception e) {
        }
    }

    public void testIllegalFrameType() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitFrame(123, 0, null, 0, null);
            fail();
        } catch (Exception e) {
View Full Code Here

        } catch (Exception e) {
        }
    }

    public void testIllegalFrameLocalCount() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitFrame(F_SAME, 1, new Object[] { INTEGER }, 0, null);
            fail();
        } catch (Exception e) {
View Full Code Here

        } catch (Exception e) {
        }
    }

    public void testIllegalFrameStackCount() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitFrame(F_SAME, 0, null, 1, new Object[] { INTEGER });
            fail();
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.ow2.asm.commons.EmptyVisitor

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.