Class<?>[] intfs =
{
iface
};
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(iface);
return (T) Proxy.newProxyInstance(config.getLoader(), intfs, clientProxy);
}