Package org.objectweb.asm

Examples of org.objectweb.asm.MethodVisitor.visitJumpInsn()


    mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Map", "get", "(Ljava/lang/Object;)Ljava/lang/Object;");
    mv.visitTypeInsn(CHECKCAST, "com/artemis/utils/Bag");
    mv.visitMethodInsn(INVOKEVIRTUAL, "com/artemis/utils/Bag", "iterator", "()Ljava/util/Iterator;");
    mv.visitVarInsn(ASTORE, 4);
    Label l8 = new Label();
    mv.visitJumpInsn(GOTO, l8);
    Label l9 = new Label();
    mv.visitLabel(l9);
    mv.visitFrame(Opcodes.F_FULL, 5, new Object[] {owner, Opcodes.INTEGER, "java/nio/ByteBuffer", Opcodes.TOP, "java/util/Iterator"}, 0, new Object[] {});
    mv.visitVarInsn(ALOAD, 4);
    mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "next", "()Ljava/lang/Object;");
View Full Code Here


    mv.visitFieldInsn(PUTFIELD, owner, "$data", "Ljava/nio/ByteBuffer;");
    mv.visitLabel(l8);
    mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
    mv.visitVarInsn(ALOAD, 4);
    mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Iterator", "hasNext", "()Z");
    mv.visitJumpInsn(IFNE, l9);
    Label l11 = new Label();
    mv.visitLabel(l11);
    mv.visitInsn(RETURN);
    Label l12 = new Label();
    mv.visitLabel(l12);
View Full Code Here

            }
            mv2.visitVarInsn(ALOAD, 2);
            mv2.visitTypeInsn(INSTANCEOF, Type.getInternalName(hierarchy.getTop()));

            Label l5 = new Label();
            mv2.visitJumpInsn(IFEQ, l5);

            Label l6 = new Label();
            mv2.visitLabel(l6);
            mv2.visitVarInsn(ALOAD, 3);
            mv2.visitVarInsn(ALOAD, 2);
View Full Code Here

            mv2.visitVarInsn(ALOAD, 3);
            mv2.visitVarInsn(ALOAD, 2);
            mv2.visitTypeInsn(CHECKCAST, Type.getInternalName(hierarchy.getTop()));
            mv2.visitMethodInsn(INVOKEVIRTUAL, Type.getInternalName(targetClass), processEventMethodName,
                    "(" + Type.getDescriptor(hierarchy.getTop()) + ")V");
            mv2.visitJumpInsn(Opcodes.GOTO, aroundLabel);
            mv2.visitLabel(l5);

            if (first) {
                mv2.visitFrame(F_APPEND, 1, new Object[] { Type.getInternalName(targetClass) }, 0, null);
                first = false;
View Full Code Here

        l1 = new Label();
        mv.visitLabel(l1);
        mv.visitLineNumber(39, l1);
        mv.visitVarInsn(Opcodes.ALOAD, 4);
        l2 = new Label();
        mv.visitJumpInsn(Opcodes.IFNULL, l2);
        l3 = new Label();
        mv.visitLabel(l3);
        mv.visitLineNumber(40, l3);
        mv.visitVarInsn(Opcodes.ALOAD, 4);
        mv.visitInsn(Opcodes.ARETURN);
View Full Code Here

        l1 = new Label();
        mv.visitLabel(l1);
        mv.visitLineNumber(39, l1);
        mv.visitVarInsn(Opcodes.ALOAD, 4);
        l2 = new Label();
        mv.visitJumpInsn(Opcodes.IFNULL, l2);
        l3 = new Label();
        mv.visitLabel(l3);
        mv.visitLineNumber(40, l3);
        mv.visitVarInsn(Opcodes.ALOAD, 4);
        mv.visitInsn(Opcodes.ARETURN);
View Full Code Here

        mv.visitVarInsn(ASTORE, varSvc); // Store the service object.

        Label notNull = new Label();
        Label isNull = new Label();
        mv.visitVarInsn(ALOAD, varSvc); // Load the service
        mv.visitJumpInsn(IFNONNULL, notNull); // If not null go to not null
        // Null branch - throw the exception
        mv.visitLabel(isNull);
        mv.visitTypeInsn(NEW, "java/lang/RuntimeException");
        mv.visitInsn(DUP);
        mv.visitLdcInsn("No service available");
View Full Code Here

        l1 = new Label();
        mv.visitLabel(l1);
        mv.visitLineNumber(39, l1);
        mv.visitVarInsn(Opcodes.ALOAD, 4);
        l2 = new Label();
        mv.visitJumpInsn(Opcodes.IFNULL, l2);
        l3 = new Label();
        mv.visitLabel(l3);
        mv.visitLineNumber(40, l3);
        mv.visitVarInsn(Opcodes.ALOAD, 4);
        mv.visitInsn(Opcodes.ARETURN);
View Full Code Here

            // bind();
            rule.getEvent().compile(mv, compileContext);
            // if (test())
            rule.getCondition().compile(mv, compileContext);
            Label l0 = new Label();
            mv.visitJumpInsn(IFEQ, l0);
            compileContext.addStackCount(-1);
            // then
            rule.getAction().compile(mv, compileContext);
            // fire();
            // end if
View Full Code Here

            mv.visitMethodInsn(INVOKESPECIAL, compiledHelperName, "bind", "()V");
            // if (test())
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, compiledHelperName, "test", "()Z");
            Label l0 = new Label();
            mv.visitJumpInsn(IFEQ, l0);
            // then
            // fire();
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, compiledHelperName, "fire", "()V");
            // end if
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.