Proxy all methods, excluding {NON_PROXIED_METHODS}, first to `receiver`
 and then to `fallback` if not found.
545597
def method_missing(method, *args, &block)
      if @__receiver__.respond_to?(method.to_sym)
        @__receiver__.__send__(method.to_sym, *args, &block)
      else
        @__fallback__.__send__(method.to_sym, *args, &block)
      end
    end
675704
public static MethodHandleProxy proxyMethod(Object target,String methodName,Object ...args)
	{
		MethodHandle mh=findMethodHandle(target, methodName, args);
		if(mh!=null)
		{
			return new MethodHandleProxy(target, mh, args);
		}
		return null;
	}
169688
protected void configureAop() {
        final RepositoryMethodInterceptor proxy = new RepositoryMethodInterceptor();
        requestInjection(proxy);
        // repository specific method annotations (query, function, delegate, etc.)
        bindInterceptor(Matchers.any(), new AbstractMatcher<Method>() {
            @Override
            public boolean matches(final Method method) {
                // this will throw error if two or more annotations specified (fail fast)
                try {
                    return ExtUtils.findMethodAnnotation(method) != null;
                } catch (Exception ex) {
                    throw new MethodDefinitionException(String.format("Error declaration on method %s",
                            RepositoryUtils.methodToString(method)), ex);
                }
            }
        }, proxy);
    }
210429
def hide_methods(mod, except_defaults, *stuff)
      options = stuff.last.is_a?(Hash) ? stuff.pop : {}
      include_ancestors  = options.fetch(:ancestors){false}
      except             = Array(options.fetch(:except){except_defaults})
      protect            = Array(options[:protect])
      except_methods     = collect_methods(true, *except)
      protect_methods    = collect_methods(true, *protect)
      methods_to_hide    = collect_methods(include_ancestors, *stuff)
      (methods_to_hide - except_methods).each do |method_name|
        mod.module_eval do 
          next unless method_defined?(method_name)
          if protect_methods.include?(method_name)
            protected method_name
          else
            private method_name
          end
        end
      end
    end
631099
def _proxy_to_logger(self, method_name, event, *event_args,
                         **event_kw):
        

        if isinstance(event, bytes):
            event = event.decode('utf-8')

        if event_args:
            event_kw['positional_args'] = event_args

        return super(BoundLevelLogger, self)._proxy_to_logger(method_name,
                                                         event=event,
                                                         **event_kw)
762884
def _watch_callback(obj_weakref, method_name, *args, **kwargs):
    
    obj = obj_weakref()
    if obj is None:
        return
    getattr(obj, method_name)(*args, **kwargs)
85185
def weakref_proxy(obj):
    """"""
    if type(obj) in weakref.ProxyTypes:
        return obj
    else:
        return weakref.proxy(obj)
288624
public static <T extends Annotation> MethodInvokeProxy proxyByAnnotation(Object target,Class<T> annotationClass,Object ...args)
	{
		Method m=findMethodByAnnotation(target,annotationClass);
		if(m!=null)
		{
			return new MethodInvokeProxy(target, m, args);
		}
		return null;
	}
505366
public Method getNonProxiedMethod(Class cls, String methodName, Class<?>... parameterTypes) throws NoSuchMethodException {
		return cls.getMethod(methodName, parameterTypes);
	}
530191
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy)
        throws Throwable {
        if (Object.class.equals(method.getDeclaringClass())) {
            return proxy.invokeSuper(obj, args);
        }

        List<WebElement> realElements = new ArrayList<>(locator.findElements());
        return getObject(realElements, method, args);
    }
431362
def proxified_elt(proxy):
    

    if ismethod(proxy):
        proxy = get_method_function(proxy)
    result = getattr(proxy, __PROXIFIED__, None)

    return result
465823
function proxyMethods(exec, query) {
    var methods = [].concat(END_POINT_METHODS).concat(CHAINABLE_METHODS);
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;

    try {
        var _loop = function _loop() {
            var name = _step.value;

            var oldMethod = query[name];
            query[name] = function () {
                var clonedQuery = query.clone();
                proxyMethods(exec, clonedQuery);

                for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
                    args[_key3] = arguments[_key3];
                }

                oldMethod.apply(clonedQuery, args);
                if (CHAINABLE_METHODS.indexOf(name) > -1) {
                    return clonedQuery;
                } else {
                    return exec(clonedQuery.toString());
                }
            };
        };

        for (var _iterator = (0, _getIterator3.default)(methods), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
            _loop();
        }
    } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
    } finally {
        try {
            if (!_iteratorNormalCompletion && _iterator.return) {
                _iterator.return();
            }
        } finally {
            if (_didIteratorError) {
                throw _iteratorError;
            }
        }
    }
}
603065
def method_missing(meth, *args, &block)
      if (po = __proxy_options__) && po.respond_to?(meth.to_s)
        po.send(meth.to_s, *args, &block)
      else
        super
      end
    end
617904
function Proxied(stream) {
      var rest;

      return inherit(stream, {
        original: function() { return stream; },
        rest: function() { 
          return rest ? rest : Proxied(stream.rest()) }
      });
    }
56329
Method findProbeProxySetFireProbeTargetMethod() throws Exception {
        Class<?> proxyClass = Class.forName(PROBE_PROXY_CLASS_NAME);
        Method setFireProbeTargetMethod = ReflectionHelper.getDeclaredMethod(
                                                                             proxyClass,
                                                                             "setFireProbeTarget",
                                                                             Object.class, Method.class);
        ReflectionHelper.setAccessible(setFireProbeTargetMethod, true);

        return setFireProbeTargetMethod;
    }
60991
def proxy(self):
        """"""
        headers = self.request.headers.filter(self.ignored_request_headers)
        qs = self.request.query_string if self.pass_query_string else ''

        # Fix for django 1.10.0 bug https://code.djangoproject.com/ticket/27005
        if (self.request.META.get('CONTENT_LENGTH', None) == '' and
                get_django_version() == '1.10'):
            del self.request.META['CONTENT_LENGTH']

        request_kwargs = self.middleware.process_request(
            self, self.request, method=self.request.method, url=self.proxy_url,
            headers=headers, data=self.request.body, params=qs,
            allow_redirects=False, verify=self.verify_ssl, cert=self.cert,
            timeout=self.timeout)

        result = request(**request_kwargs)

        response = HttpResponse(result.content, status=result.status_code)

        # Attach forwardable headers to response
        forwardable_headers = HeaderDict(result.headers).filter(
            self.ignored_upstream_headers)
        for header, value in iteritems(forwardable_headers):
            response[header] = value

        return self.middleware.process_response(
            self, self.request, result, response)
1297000
def proxy(opts, functions=None, returners=None, whitelist=None, utils=None):
    '''
    
    '''
    ret = LazyLoader(
        _module_dirs(opts, 'proxy'),
        opts,
        tag='proxy',
        pack={'__salt__': functions, '__ret__': returners, '__utils__': utils},
    )

    ret.pack['__proxy__'] = ret

    return ret