class RestfulProxyBuilder<T> {
    private final Class<T> iface;
    private final ResteasyWebTarget webTarget;
    private ClassLoader loader = Thread.currentThread().getContextClassLoader();
    private MediaType serverConsumes;
    private MediaType serverProduces;

    public static <T> RestfulProxyBuilder<T> builder(Class<T> iface, WebTarget webTarget) {
        return new RestfulProxyBuilder<T>(iface, (ResteasyWebTarget) webTarget);
    }

    public static Map<Method, RestfulClientInvoker> proxy(final Class<?> iface, WebTarget base,
            final ProxyConfig config) {<FILL_FUNCTION_BODY>}

    private static <T> RestfulClientInvoker createClientInvoker(Class<T> clazz, Method method, ResteasyWebTarget base,
            ProxyConfig config) {
        Set<String> httpMethods = IsHttpMethod.getHttpMethods(method);
        if (httpMethods == null || httpMethods.size() != 1) {
            throw new RuntimeException(
                    "You must use at least one, but no more than one http method annotation on: " + method.toString());
        }

        RestfulClientInvoker invoker = new RestfulClientInvoker(base, clazz, method, config);
        invoker.setHttpMethod(httpMethods.iterator().next());
        return invoker;
    }

    private RestfulProxyBuilder(Class<T> iface, ResteasyWebTarget webTarget) {
        this.iface = iface;
        this.webTarget = webTarget;
    }

    public RestfulProxyBuilder<T> classloader(ClassLoader cl) {
        this.loader = cl;
        return this;
    }

    public RestfulProxyBuilder<T> defaultProduces(MediaType type) {
        this.serverProduces = type;
        return this;
    }

    public RestfulProxyBuilder<T> defaultConsumes(MediaType type) {
        this.serverConsumes = type;
        return this;
    }

    public RestfulProxyBuilder<T> defaultProduces(String type) {
        this.serverProduces = MediaType.valueOf(type);
        return this;
    }

    public RestfulProxyBuilder<T> defaultConsumes(String type) {
        this.serverConsumes = MediaType.valueOf(type);
        return this;
    }

    public Map<Method, RestfulClientInvoker> build() {
        return proxy(iface, webTarget, new ProxyConfig(loader, serverConsumes, serverProduces));
    }

}

        if (iface.isAnnotationPresent(Path.class)) {
            Path path = iface.getAnnotation(Path.class);
            if (!path.value().equals("") && !path.value().equals("/")) {
                base = base.path(path.value());
            }
        }

        HashMap<Method, RestfulClientInvoker> methodMap = new HashMap<Method, RestfulClientInvoker>();
        for (Method method : iface.getMethods()) {
            RestfulClientInvoker invoker = createClientInvoker(iface, method, (ResteasyWebTarget) base, config);
            methodMap.put(method, invoker);
        }

        return methodMap;
    
<no_super_class>