Package org.objectweb.asm

Examples of org.objectweb.asm.CodeVisitor.visitVarInsn()


        mv.visitMethodInsn(INVOKEVIRTUAL, classToWrite, M_SPEEDO_GET_STATE, "()" + JT_STATE);
        mv.visitVarInsn(ASTORE, 1);

        //return sa != null && LifeCycle.isNew(sa.jdoGetStatus());
        Label l4 = new Label();
        mv.visitVarInsn(ALOAD, 1);
        mv.visitJumpInsn(IFNULL, l4);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitMethodInsn(INVOKEINTERFACE, JCN_STATE, M_SPEEDO_GET_STATUS, "()B");
        mv.visitMethodInsn(INVOKESTATIC,JCN_LIFE_CYCLE, "isNew", "(B)Z");
        mv.visitJumpInsn(IFEQ, l4);
View Full Code Here


        //return sa != null && LifeCycle.isNew(sa.jdoGetStatus());
        Label l4 = new Label();
        mv.visitVarInsn(ALOAD, 1);
        mv.visitJumpInsn(IFNULL, l4);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitMethodInsn(INVOKEINTERFACE, JCN_STATE, M_SPEEDO_GET_STATUS, "()B");
        mv.visitMethodInsn(INVOKESTATIC,JCN_LIFE_CYCLE, "isNew", "(B)Z");
        mv.visitJumpInsn(IFEQ, l4);
        mv.visitInsn(ICONST_1);
        Label l5 = new Label();
View Full Code Here

        mv = cv.visitMethod(ACC_PUBLIC, "jdoIsDeleted", "()Z", null, null);

        generateReturnFalseIfNotIsActive(mv);

        //StateItf sa = speedoGetState();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classToWrite, M_SPEEDO_GET_STATE, "()" + JT_STATE);
        mv.visitVarInsn(ASTORE, 1);

        //return sa != null && LifeCycle.isDeleted(sa.jdoGetStatus());
        Label l4 = new Label();
View Full Code Here

        generateReturnFalseIfNotIsActive(mv);

        //StateItf sa = speedoGetState();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEVIRTUAL, classToWrite, M_SPEEDO_GET_STATE, "()" + JT_STATE);
        mv.visitVarInsn(ASTORE, 1);

        //return sa != null && LifeCycle.isDeleted(sa.jdoGetStatus());
        Label l4 = new Label();
        mv.visitVarInsn(ALOAD, 1);
        mv.visitJumpInsn(IFNULL, l4);
View Full Code Here

        mv.visitMethodInsn(INVOKEVIRTUAL, classToWrite, M_SPEEDO_GET_STATE, "()" + JT_STATE);
        mv.visitVarInsn(ASTORE, 1);

        //return sa != null && LifeCycle.isDeleted(sa.jdoGetStatus());
        Label l4 = new Label();
        mv.visitVarInsn(ALOAD, 1);
        mv.visitJumpInsn(IFNULL, l4);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitMethodInsn(INVOKEINTERFACE, JCN_STATE, M_SPEEDO_GET_STATUS, "()B");
        mv.visitMethodInsn(INVOKESTATIC, JCN_LIFE_CYCLE, "isDeleted", "(B)Z");
        mv.visitJumpInsn(IFEQ, l4);
View Full Code Here

        //return sa != null && LifeCycle.isDeleted(sa.jdoGetStatus());
        Label l4 = new Label();
        mv.visitVarInsn(ALOAD, 1);
        mv.visitJumpInsn(IFNULL, l4);
        mv.visitVarInsn(ALOAD, 1);
        mv.visitMethodInsn(INVOKEINTERFACE, JCN_STATE, M_SPEEDO_GET_STATUS, "()B");
        mv.visitMethodInsn(INVOKESTATIC, JCN_LIFE_CYCLE, "isDeleted", "(B)Z");
        mv.visitJumpInsn(IFEQ, l4);
        mv.visitInsn(ICONST_1);
        Label l5 = new Label();
View Full Code Here

            "(Ljava/lang/String;)Ljava/lang/Class;", null, null);
          //try {
                final Label l0 = new Label();
          c.visitLabel(l0);
          //return Class.forName(str)
                c.visitVarInsn(ALOAD, 0);
          c.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName",
            "(Ljava/lang/String;)Ljava/lang/Class;");
          final Label l1 = new Label();
          c.visitLabel(l1);
          c.visitInsn(ARETURN);
View Full Code Here

          final Label l1 = new Label();
          c.visitLabel(l1);
          c.visitInsn(ARETURN);
                final Label l2 = new Label();
          c.visitLabel(l2);
          c.visitVarInsn(ASTORE, 1);
          c.visitTypeInsn(NEW, "java/lang/NoClassDefFoundError");
          c.visitInsn(DUP);
          c.visitVarInsn(ALOAD, 1);
          c.visitMethodInsn(INVOKEVIRTUAL, "java/lang/ClassNotFoundException",
            "getMessage", "()Ljava/lang/String;");
View Full Code Here

                final Label l2 = new Label();
          c.visitLabel(l2);
          c.visitVarInsn(ASTORE, 1);
          c.visitTypeInsn(NEW, "java/lang/NoClassDefFoundError");
          c.visitInsn(DUP);
          c.visitVarInsn(ALOAD, 1);
          c.visitMethodInsn(INVOKEVIRTUAL, "java/lang/ClassNotFoundException",
            "getMessage", "()Ljava/lang/String;");
          c.visitMethodInsn(INVOKESPECIAL, "java/lang/NoClassDefFoundError",
            "<init>", "(Ljava/lang/String;)V");
          c.visitInsn(ATHROW);
View Full Code Here

            logger.log(BasicLevel.DEBUG, "Generate the method: getCeObject");
        }
        CodeVisitor mv = cv.visitMethod(ACC_PUBLIC, "getCeObject",
                "()Ljava/lang/Object;", null, null);
        // return this;
        mv.visitVarInsn(ALOAD, 0);
        mv.visitInsn(ARETURN);
        mv.visitMaxs(0, 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.