I\'d like to access the classname of the underlying class which is an instance of java.lang.reflect.Proxy.
Is this possible?
You can use the following code for retrieve the info (ArrayUtils is from Apache commons lang) about invocation handler and the interfaces of the current proxy:
String.format("[ProxyInvocationHandler: %s, Interfaces: %s]",
Proxy.getInvocationHandler(proxy).getClass().getSimpleName(),
ArrayUtils.toString(proxy.getClass().getInterfaces()));
Example result:
[ProxyInvocationHandler: ExecuteProxyChain, Interfaces: {interface com.example.api.CustomerApi}]}