Look into reflection, ie using the methods on the Class class. Look at the JavaDoc for Class getFields() and getDeclaredFields(). Many frameworks that convert objects to XML or move objects in and out of databases use these tricks to get and set fields. Take a shot at making them work from the doc and let us know how it goes!
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Jan 16, 2003
hi, just wanna share
listing the properties of a class and checking if its a list was easy
just posted my code just in case someone needs a similar approach.