This function will be deprecated.

    Removes one wrap around the method (given as a parameter) and
    returns the wrap. If the method is not wrapped, returns None.
336131
def peel_around(method):
    
    _permission_to_touch_wraps.acquire() # released in finally part
    try:
        if hasattr(method,'__aspects_enabled'): # new-style aspect, easy!
            method.__aspects_rmf(method.__name__,method.__aspects_orig)
            return method.__aspects_adv
        
        methods_name = method.__name__
        methods_class = method.im_class

        wc = wrap_count(method)-1

        if wc==-1: return None

        wrapped = getattr(methods_class, '__wrapped' + str(wc) + methods_name)
        setattr(methods_class, methods_name, wrapped)

        removed_adv = getattr(methods_class, '__wrap'+str(wc)+methods_name)
        del methods_class.__dict__['__wrapped'+str(wc)+methods_name]
        del methods_class.__dict__['__wrap'+str(wc)+methods_name]

        return removed_adv
    finally: _permission_to_touch_wraps.release()
830847
private Function wrapValueMethod(Method method) {
    return c -> {
      try {
        return method.invoke(this, c);
      } catch (InvocationTargetException e) {
        throw new CommandException(e);
      } catch (IllegalAccessException e) {
        throw new AssertionError(e);
      }
    };
  }
304984
def _wrap_method(name):
  
  method = getattr(datetime.datetime, name)

  # Have to give the second argument as method has no __module__ option.
  @functools.wraps(method, ("__name__", "__doc__"), ())
  def wrapper(self, *args, **kw):
    r = method(self, *args, **kw)

    if isinstance(r, datetime.datetime) and not isinstance(r, type(self)):
      r = type(self)(r)
    return r

  setattr(datetime_tz, name, wrapper)
505429
public final Method getTargetMethod() {
        Method method = initialize();
        if (method == null) {
            if (LOG.isWarnEnabled()) {
                if (LOG.isWarnEnabled()) {
                    LOG.warn("Type [{}] previously declared a method [{}] which has been removed or changed. It is recommended you re-compile the class or library against the latest version to remove this warning.", declaringType, methodName);
                }
            }
            throw ReflectionUtils.newNoSuchMethodError(declaringType, methodName, argTypes);
        }
        return method;
    }
984570
def remove(self, method: Method):
        
        self._table = [fld for fld in self._table if fld is not method]
1160850
function resolveMethod(wrapedMethod, methodRaw){

				// Get method string and `methodify` it recursivelly
				var method = getMethodFor(methodRaw);

				// Check if method is ok to continue, or, return null
				if(!method) throw new Error('Could not parse method: '+methodRaw);

				// Create a wrapped method of the current one, with this one
				return function(scores){
					return wrapedMethod(method(scores));
				}
			}
7451
def deprecate(cls, fn):
        
        def inner(*args, **kwargs):
            if cls._disable_stubs:
                raise AssertionError('Stubs supporting old API disabled')
            elif cls._disable_stubs is None:
                pass
            elif cls._disable_stubs is False:
                get_logger(name=args[0].__class__.__name__).log(
                    WARNING, 'Use method %r via param namespace ' % fn.__name__)
            return fn(*args, **kwargs)

        inner.__doc__= "Inspect .param.%s method for the full docstring"  % fn.__name__
        return inner
1096084
def strip_boolean_result(method, exc_type=None, exc_str=None, fail_ret=None):
    
    @wraps(method)
    def wrapped(*args, **kwargs):
        ret = method(*args, **kwargs)
        if ret[0]:
            if len(ret) == 2:
                return ret[1]
            else:
                return ret[1:]
        else:
            if exc_type:
                raise exc_type(exc_str or 'call failed')
            return fail_ret
    return wrapped
203835
public static <T, R, E extends Throwable> @NonNull Function<T, R> unwrappingRethrowFunction(final @NonNull ThrowingFunction<T, R, E> function) {
    return input -> {
      try {
        return function.throwingApply(input);
      } catch(final Throwable t) {
        throw rethrow(unwrap(t));
      }
    };
  }
17120
function(methodName, sinceVersion, removeVersion, replacementCall) {
      if(window.console && console.log){
        console.log(methodName + ' has been deprecated since ' + sinceVersion +
          ' and will be removed in version ' + removeVersion + '.' +
          ' Use ' + replacementCall + ' instead.');
      }
    }
1236286
def _unwrap_func(cls, decorated_func):
        '''
        
        '''
        if click is not None:
            # Workaround for click.command() decorator not setting
            # __wrapped__
            if isinstance(decorated_func, click.Command):
                return cls._unwrap_func(decorated_func.callback)

        if hasattr(decorated_func, '__wrapped__'):
            # Recursion: unwrap more if needed
            return cls._unwrap_func(decorated_func.__wrapped__)
        else:
            # decorated_func isn't actually decorated, no more
            # unwrapping to do
            return decorated_func
1275023
def _wrap(method: Callable, wrapper: Callable) -> Callable:
        
        def wrapped(*args, **kwargs):
            return wrapper(method, *args, **kwargs)
        return wrapped
1010056
def deprecated(use_instead=None):
    """"""

    def wrapped(func):
        @wraps(func)
        def new_func(*args, **kwargs):
            message = "Call to deprecated function %s." % func.__name__
            if use_instead:
                message += " Use %s instead." % use_instead
            if not DISABLE_WARNINGS:
                warn(message, stacklevel=3)
            return func(*args, **kwargs)
        return new_func
    return wrapped
83641
private void removeOverriddenMethod(MethodDoc method) {
        ClassDoc overriddenClass = method.overriddenClass();
        if (overriddenClass != null) {
            for (int i = 0; i < methlist.size(); i++) {
                ClassDoc cd = methlist.get(i).containingClass();
                if (cd == overriddenClass || overriddenClass.subclassOf(cd)) {
                    methlist.remove(i);  // remove overridden method
                    return;
                }
            }
        }
    }
983647
def declassify(to_remove, *args, **kwargs):
    
    def argdecorate(fn):
        """ enable the to_remove argument to the decorator. """
        # wrap the function to get the original docstring
        @wraps(fn)
        def declassed(*args, **kwargs):
            # call the method
            ret = fn(*args, **kwargs)
            # catch errors that are thrown by the api
            try:
                # ensure that ret is a list
                if type(ret) is list:
                    return [r[to_remove] for r in ret]
                return ret[to_remove]
            except KeyError:
                return ret
        return declassed
    return argdecorate
745884
def to_method(func):
    
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        """Wrapper function.
        """
        return func(*args[1:], **kwargs)

    return wrapper
167790
public static Object unwrap(Object o) {
        Wrapper w = (Wrapper) o;
        return w.unwrap();
    }