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!