* @param arguments
   * @return long
   */
  public static long applyLongIntegerMethod(java.lang.reflect.Method code, Cons arguments) {
    switch (arguments.length()) {
      case 0: 
        throw ((StellaException)(StellaException.newStellaException("Can't call method code on 0 arguments.").fillInStackTrace()));
      case 1: 
        return (((Long)(edu.isi.stella.javalib.Native.funcall(code, arguments.value, new java.lang.Object []{}))).longValue());
      case 2: 
        return (((Long)(edu.isi.stella.javalib.Native.funcall(code, arguments.value, new java.lang.Object []{arguments.rest.value}))).longValue());
      case 3: 
        return (((Long)(edu.isi.stella.javalib.Native.funcall(code, arguments.value, new java.lang.Object []{arguments.rest.value, arguments.nth(2)}))).longValue());
      case 4: 
        return (((Long)(edu.isi.stella.javalib.Native.funcall(code, arguments.value, new java.lang.Object []{arguments.rest.value, arguments.nth(2), arguments.nth(3)}))).longValue());
      case 5: 
        return (((Long)(edu.isi.stella.javalib.Native.funcall(code, arguments.value, new java.lang.Object []{arguments.rest.value, arguments.nth(2), arguments.nth(3), arguments.nth(4)}))).longValue());
      default:
        throw ((StellaException)(StellaException.newStellaException("Too many function arguments in `apply'.  Max is 5.").fillInStackTrace()));
    }
  }