Details
-
Wish
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
2.0.5, 2.0.6
-
None
-
None
Description
After playing with @AutoExternalize, I found out the hard way I cannot use Externalizable (due to XStream, long story), but using Serializable is possible.
So, if Groovy has @AutoExternalize, why not have @AutoSerialize?
The code would be pretty identical. Here are the changes:
- no explicit no-argument constructor needed
- private void readObject(ObjectInputStream) instead of public void readExternal(ObjectInput)
- private void writeObject(ObjectOutputStream) instead of public void writeExternal(ObjectOutput)
- no need to call super.
{readObject|writeObject}
FWIK, contrary to Externalizable.