How to automatically execute a method after deserialization?

Viewed 7892

I've got a class Foo, it's Serializable. It represents a graphical object, and I want it to restore its handles to the state before serializing. All data is stored within the object, I just need a method to be called in the right moment. How can I achieve it? Is this possible in Java?

(I have my Foos in a List in Bar object, and in some other places - that's why I don't want to do it manually.)

1 Answers
Related