Possible Duplicate:
How to loop over a Class attributes in Java?
class Foo{
    int id;
    String name;
    int bar;
    int bar2;
    //..
}
Foo foo = new Foo();
Is there a way to iterate over this object attributes in java? I want to create an INSERT query and i have to convert all int attributes in Strings. It is a little problematic when there are more attributes of different types.
Thanks!
 
     
     
     
     
     
    