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: See the links below for examples of Serializable versions of these types of classes.

See Also :
Type-Safe Enumerations
Singleton
Would you use this technique?
Yes   No   Undecided   
© 2013 Hirondelle Systems | Source Code | Contact | License | RSS
Individual code snippets can be used under this BSD license - Last updated on August 30, 2012.
Over 2,400,000 unique IPs last year - Built with WEB4J.
- In Memoriam : Bill Dirani -