Some classes need readResolve
There are two common cases in which a readResolve method is required for proper deserialization. Both cases use specific instances of objects to define their behaviour:
- older forms of type-safe enumerations, that don't use enum
- singletons
See Also :
Would you use this technique?