if(Proxy.isProxyClass(o.getClass()))
{
InvocationHandler invocationHandler = Proxy.getInvocationHandler(o);
if(invocationHandler instanceof ObjectProxy)
{
ObjectProxy objectProxy = (ObjectProxy) invocationHandler;
Object proxiedObject = objectProxy.getProxiedObject();
sb.append(" (proxy of: ").append(getIdentity(proxiedObject)).append(")");
}
}