title: Check whether a Java Object has been modified
body: <p>I would like to use a clean/automatic way to check if a Java Object has been modified.<br>
  My specific problem is the following:<br><br>
  In my Java application, I use XStream library to deserialize XML to Java Objects, then the user can modify or change them. I'd like a way to check if these Objects in memory are at some point different from the serialized ones, so I can inform the user and ask him if he want to save the changes (i.e. serialize using XStream) or not.
  In my application there are many Objects and are quite complex.
  <br><br>
  Please consider that I don't use databases in my application, so I'm not interested in solutions like using hibernate.</p>