Returns a function which invokes the method as if it were a method belonging to the object.
@function
@param {Object} object
@param {Function} method
@returns {Function}
357976
function( object, method ) {
            return function(){
                var args = arguments;
                if ( args === undefined ){
                    args = [];
                }
                return method.apply( object, args );
            };
        }
1327827
function(method) {
            return _.find(this.methods, function(handler) {
                return handler.regexp.test(method);
            }) || this.defaultHandler;
        }
1076000
function Off(event, method) {
      return function (target, key, descriptor) {
          key = hyphenate(key);
          var original = descriptor.value;
          descriptor.value = function offer() {
              var args = [];
              for (var _i = 0; _i < arguments.length; _i++) {
                  args[_i] = arguments[_i];
              }
              if (original.apply(this, args) !== false) {
                  if (method) {
                      if (typeof this[method] === 'function') {
                          this.$off(event || key, this[method]);
                      }
                      else {
                          throw new TypeError('must be a method name');
                      }
                  }
                  else if (event) {
                      this.$off(event || key);
                  }
                  else {
                      this.$off();
                  }
              }
          };
      };
  }
965645
function(object, methods) {
        _.each(methods, function(method, name) {
            if (!_.isFunction(method)) {
                throw new Error('Method "' + name + '" must be a function!');
            }
            object[name] = method
        });
    }
338180
function Deprecate(methodDescriptor) {
    let {descriptor, key} = methodDescriptor;

    let fn = descriptor.value;

    descriptor.value = function(...args) {
        console.warn(`DEPRECATE: [${key}] This function will be removed in future versions.`);
        return fn.apply(this, args);
    };

    return {
        ...methodDescriptor,
        descriptor,
    };
}
262636
function call(method, varargs) {
        var argsArray = [_objectId, "_LD." + method];

        if (arguments.length > 1) {
            argsArray = argsArray.concat(Array.prototype.slice.call(arguments, 1));
        }

        return _call.apply(null, argsArray);
    }
129189
function makeMethod(func) {
	return function() {
		var args = [this].concat(slice.call(arguments));
		return func.apply(null, args);
	};
}
764691
function _createMethod(definition, method){
        var slice = Array.prototype.slice;
        
        return function(){
            var l = arguments.length, callback, message = {
                method: method
            };
            
            if (l > 0 && typeof arguments[l - 1] === "function") {
                //with callback, procedure
                if (l > 1 && typeof arguments[l - 2] === "function") {
                    // two callbacks, success and error
                    callback = {
                        success: arguments[l - 2],
                        error: arguments[l - 1]
                    };
                    message.params = slice.call(arguments, 0, l - 2);
                }
                else {
                    // single callback, success
                    callback = {
                        success: arguments[l - 1]
                    };
                    message.params = slice.call(arguments, 0, l - 1);
                }
                _callbacks["" + (++_callbackCounter)] = callback;
                message.id = _callbackCounter;
            }
            else {
                // no callbacks, a notification
                message.params = slice.call(arguments, 0);
            }
            if (definition.namedParams && message.params.length === 1) {
                message.params = message.params[0];
            }
            // Send the method request
            _send(message);
        };
    }
1020184
public static <T> T invokeMethod(Object obj, String methodName, Object... args) {
		Object[] theArgs = ArrayUtils.nullToEmpty(args);
		final Class<?>[] parameterTypes = ClassUtils.toClass(theArgs);
		return invokeMethod(obj, methodName, theArgs, parameterTypes);
	}
818186
public Object invoke (Object object, String methodName, Object... args) {
		return invoke(object, getIndex(methodName, args == null ? 0 : args.length), args);
	}
950213
function(authMethods){
      var _method = {};
      var _methodName;

      try{
        _.each(authMethods, function(method){
          _methodName = method.name;
          method = _.merge(require('../../'+_methodName), method);
          _method[method.authType] = method;
        });
      }catch(e){
        this._errorHandler(_methodName);
      }

      return _method;
    }
1327226
private Object invokeMethod(final Object obj, final Method method, final Object... args) {
        // turn method to accessible. otherwise, we won't be able to callback to methods
        // on non-public classes.
        boolean accessibility = method.isAccessible();
        method.setAccessible(true);

        try {
            try {
                return method.invoke(obj, args);
            } catch (Exception e) {
                this.log("Error while invoking %s with %s: %s", method, Arrays.toString(args), Throwables.getStackTraceAsString(e));
                throw e;
            }
        } catch (InvocationTargetException e) {
            throw new JsiiException(e.getTargetException());
        } catch (IllegalAccessException e) {
            throw new JsiiException(e);
        } finally {
            // revert accessibility.
            method.setAccessible(accessibility);
        }
    }
1072411
function (method) {
    return (
      /* The core method implementation. */
      function () {
        if (api.enabled) {
          if (doesConsoleExistImpl()) {
            /* The common way. */
            if (typeof console[method] === "function") {
              console[method].apply(console, arguments);
            }
            /* The IE 8–9 way. */
            else {
              P_FUNCTION.apply.call(console[method], console, arguments);
            }
          }
          else {
            api.logs.push(P_ARRAY.slice.call(arguments));
          }
        }
        return api;
      }
    );
  }
576483
function requestHandler (method) {
  return function (req, res, next) {
    method.call(this, req, responseHandler(res, next));
  }.bind(this);
}
278325
function addMethod(name, method) {
        if (method !== undefined) {
            methods[name] = method;
        }
        return methods[name];
    }
654164
function bindMethods (obj, methods) {
  methods = [].slice.call(arguments, 1);
  for (var i = 0, method; method = methods[i]; i++) {
    obj[method] = bind(obj, obj[method]);
  }
  return obj;
}
723006
function NextTick(method) {
      return function (target, key, descriptor) {
          var original = descriptor.value;
          descriptor.value = function emitter() {
              var args = [];
              for (var _i = 0; _i < arguments.length; _i++) {
                  args[_i] = arguments[_i];
              }
              if (original.apply(this, args) !== false)
                  if (typeof this[method] === 'function') {
                      this.$nextTick(this[method]);
                  }
                  else {
                      throw new TypeError('must be a method name');
                  }
          };
      };
  }