What I have is an unmarshalled java object from XML. The parts of this unmarshalled object is sent to various class for processing. I need to log the contents of the unmarshalled object. I can easily override the toString() method but the problem is that in this case the classes are generated at build time using xjc and I cannot override the toString() in those classes as they will be removed when generated again.
I am looking for some other alternative to print the contents. Any Idea ?
You could use an xjc plugin to generate the toString you want.