Package org.objectweb.asm

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


                          "org/apache/cxf/jaxb/NamespaceMapperInternal",
                          "nspref", "Ljava/util/Map;");
        mv.visitVarInsn(Opcodes.ALOAD, 1);
        mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/Map",
                           "get", "(Ljava/lang/Object;)Ljava/lang/Object;");
        mv.visitTypeInsn(Opcodes.CHECKCAST, "java/lang/String");
        mv.visitVarInsn(Opcodes.ASTORE, 4);
        l1 = new Label();
        mv.visitLabel(l1);
        mv.visitLineNumber(39, l1);
        mv.visitVarInsn(Opcodes.ALOAD, 4);
View Full Code Here


                          "org/apache/cxf/jaxb/NamespaceMapperInternal",
                          "nspref", "Ljava/util/Map;");
        mv.visitVarInsn(Opcodes.ALOAD, 1);
        mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/Map",
                           "get", "(Ljava/lang/Object;)Ljava/lang/Object;");
        mv.visitTypeInsn(Opcodes.CHECKCAST, "java/lang/String");
        mv.visitVarInsn(Opcodes.ASTORE, 4);
        l1 = new Label();
        mv.visitLabel(l1);
        mv.visitLineNumber(39, l1);
        mv.visitVarInsn(Opcodes.ALOAD, 4);
View Full Code Here

        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");
        mv.visitMethodInsn(INVOKESPECIAL, "java/lang/RuntimeException", "<init>", "(Ljava/lang/String;)V");
        mv.visitInsn(ATHROW);
        // End of the null branch
View Full Code Here

                          "org/apache/cxf/jaxb/NamespaceMapperInternal",
                          "nspref", "Ljava/util/Map;");
        mv.visitVarInsn(Opcodes.ALOAD, 1);
        mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, "java/util/Map",
                           "get", "(Ljava/lang/Object;)Ljava/lang/Object;");
        mv.visitTypeInsn(Opcodes.CHECKCAST, "java/lang/String");
        mv.visitVarInsn(Opcodes.ASTORE, 4);
        l1 = new Label();
        mv.visitLabel(l1);
        mv.visitLineNumber(39, l1);
        mv.visitVarInsn(Opcodes.ALOAD, 4);
View Full Code Here

            mv.visitVarInsn(ALOAD, 0);
            mv.visitFieldInsn(GETFIELD, compiledHelperName, "rule", "Lorg/jboss/byteman/rule/Rule;");
            mv.visitMethodInsn(INVOKEVIRTUAL, "org/jboss/byteman/rule/Rule", "getCondition", "()Lorg/jboss/byteman/rule/Condition;");
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKEVIRTUAL, "org/jboss/byteman/rule/Condition", "interpret", "(Lorg/jboss/byteman/rule/helper/HelperAdapter;)Ljava/lang/Object;");
            mv.visitTypeInsn(Opcodes.CHECKCAST, "java/lang/Boolean");
            // unbox the returned Boolean
            mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Boolean", "booleanValue", "()Z");
            // return {TOS}
            mv.visitInsn(IRETURN);
            mv.visitMaxs(2, 1);
View Full Code Here

            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, helperName, "<init>", "()V");
        }
        // bindingMap = new HashMap<String, Object);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitTypeInsn(NEW, "java/util/HashMap");
        mv.visitInsn(DUP);
        mv.visitMethodInsn(INVOKESPECIAL, "java/util/HashMap", "<init>", "()V");
        mv.visitFieldInsn(PUTFIELD, compiledHelperName, "bindingMap", "Ljava/util/HashMap;");
        // this.rule = rule
        mv.visitVarInsn(ALOAD, 0);
View Full Code Here

            Label l0 = new Label();
            mv.visitJumpInsn(IFEQ, l0);
            // then
            // System.out.println(rule.getName() + " execute");
            mv.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;");
            mv.visitTypeInsn(NEW, "java/lang/StringBuilder");
            mv.visitInsn(DUP);
            mv.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V");
            mv.visitVarInsn(ALOAD, 0);
            mv.visitFieldInsn(GETFIELD, compiledHelperName, "rule", "Lorg/jboss/byteman/rule/Rule;");
            mv.visitMethodInsn(INVOKEVIRTUAL, "org/jboss/byteman/rule/Rule", "getName", "()Ljava/lang/String;");
View Full Code Here

    for (Map.Entry<String, String> ent : funs.entrySet()) {

      String field = ent.getKey();
      String clazz = ent.getValue();

      mv.visitTypeInsn(NEW, clazz);
      mv.visitInsn(DUP);
      mv.visitMethodInsn(INVOKESPECIAL, clazz, "<init>", "()V");

      mv.visitFieldInsn(PUTSTATIC, self_type.getInternalName(), field,
          "L" + funt.get(field) + ";");
View Full Code Here

        mv.visitMethodInsn(INVOKESTATIC,
            Type.getType(ErlConvert.class).getInternalName(),
            "binary_to_term",
            EUtil.getSignature(1, false));
       
        mv.visitTypeInsn(CHECKCAST, type.getInternalName());
       
      } else {   
        term.emit_const(mv);
      }
     
View Full Code Here

        // load proc
        mv.visitVarInsn(ALOAD, 1);

        // create array
        mv.visitLdcInsn(new Integer(arity));
        mv.visitTypeInsn(ANEWARRAY, EOBJECT_TYPE.getInternalName());

        for (int i = 0; i < arity; i++) {
            mv.visitInsn(DUP);
            mv.visitLdcInsn(new Integer(i));
            mv.visitVarInsn(ALOAD, i + 2);
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.