0
comment
comment
on 11/23/2011 6:36 AM
So, I found myself in a situation where I was creating JDK Proxies, and I was in control of the invocation of newProxyInstance and needed to make the Proxies transparently Serializable.
The problem is that for it to work you need writeReplace, so that you’re in control of the rematerialization of the Proxy on the deserializing side using readResolve.
However, the problem is that you need to make sure that the Proxy gets a writeReplace method, and you don’t want to force the guy providing you with what int[...]