methodMap.put(method, invoker);
}
Class<?>[] intfs = {clazz, ResteasyClientProxy.class};
ClientProxy clientProxy = new ClientProxy(methodMap);
// this is done so that equals and hashCode work ok. Adding the proxy to a
// Collection will cause equals and hashCode to be invoked. The Spring
// infrastructure had some problems without this.
clientProxy.setClazz(clazz);
return (T) Proxy.newProxyInstance(clazz.getClassLoader(), intfs, clientProxy);
}