This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a requirement to print the member variables and their values of a java bean object. I am thinking of using reflection to perform this task. But the challenge is, if one of the member variable happens to be another java bean then the member variable and values of that bean also needs to be printed. I am not sure how I can verify if a particular member variable is a java object or not. More specifically, the difficult part is to differentiate between jdk java objects(like String, Boolean, etc.,) and the custom java objects. Do you have any ideas in accomplishing this?