* Override the writeReplace method to replace this class with a proxy to it (if it's anchored)
*/
public Object writeReplace() throws ObjectStreamException {
if (getIsAnchored()) {
this.invoker.prepareForRemoteCall();
AnchoredProxy proxy = this.getProxy();
//System.out.println("Replacing " + this + " with " + proxy + " in writeReplace");
return proxy;
}
else {
return this;