Package org.objectweb.asm

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


            mv.visitInsn(RETURN);
        }

        // End of the method.
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    /**
     * Generates the constructors. The constructor receives a temporal dependency
     * and set the {@link ProxyGenerator#DEPENDENCY} field.
View Full Code Here


        mv.visitVarInsn(ALOAD, 1); // Load the argument
        mv.visitFieldInsn(PUTFIELD, className, DEPENDENCY, DEPENDENCY_DESC); // Assign the dependency field
        mv.visitInsn(RETURN); // Return void

        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    /**
     * Adds the temporal dependency field {@link ProxyGenerator#DEPENDENCY}.
     * @param cw the class writer
View Full Code Here

        "()V");

    mv.visitInsn(Opcodes.ARETURN);

    mv.visitMaxs(3, 3);
    mv.visitEnd();
  }

  private static void create_tuple_make(int i, ClassVisitor cw,
      String this_class_name, String super_class_name) {
    MethodVisitor mv;
View Full Code Here

        "()V");

    mv.visitInsn(Opcodes.ARETURN);

    mv.visitMaxs(3, 3);
    mv.visitEnd();
  }

  private static void create_tuple_make2(int arity, ClassVisitor cw,
      String this_class_name, String super_class_name) {
    MethodVisitor mv;
View Full Code Here

    }
   
    mv.visitInsn(Opcodes.ARETURN);

    mv.visitMaxs(3, arity);
    mv.visitEnd();
  }

  private static void make_blank_bridge(ClassVisitor cw,
      String this_class_name, String super_class_name) {
    MethodVisitor mv;
View Full Code Here

    mv.visitVarInsn(Opcodes.ALOAD, 0);
    mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, this_class_name, "blank",
        "()L" + this_class_name + ";");
    mv.visitInsn(Opcodes.ARETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
  }

  private static void create_tuple_nth(int n_cells, ClassVisitor cw,
      String this_class_name) {
    MethodVisitor mv;
View Full Code Here

    mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, ETUPLE_NAME, "bad_nth", "(I)"
        + ETERM_TYPE.getDescriptor());
    mv.visitInsn(Opcodes.ARETURN); // make compiler happy

    mv.visitMaxs(3, 2);
    mv.visitEnd();
  }

  private static void create_tuple_set(int n_cells, ClassVisitor cw,
      String this_class_name) {
    MethodVisitor mv;
View Full Code Here

        + ETERM_TYPE.getDescriptor());
    mv.visitInsn(Opcodes.POP);
    mv.visitInsn(Opcodes.RETURN); // make compiler happy

    mv.visitMaxs(3, 3);
    mv.visitEnd();
  }

  protected final EObject bad_nth(int i) {
    throw ERT.badarg(this);
  }
View Full Code Here

    } else {
      mv.visitLdcInsn(new Integer(n));
    }
    mv.visitInsn(Opcodes.IRETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
  }

  private static void create_cast(ClassVisitor cw, int n) {
    MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC
        | Opcodes.ACC_STATIC, "cast", "(L" + ETUPLE_NAME + ";)L"
View Full Code Here

    mv.visitLabel(fail);
    mv.visitInsn(Opcodes.ACONST_NULL);
    mv.visitInsn(Opcodes.ARETURN);

    mv.visitMaxs(2, 2);
    mv.visitEnd();
  }


  private static void create_cast2(ClassVisitor cw, int n) {
    MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC
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.