Can I only use reflection to enquire about the contents of a Class.
What I want to do is to read in a property file and populate the property value into a MyObject object.
e.g. MyObject have fields String f1,int f2,String f3, etc.
and the properties file I read have key f1,f2,f3
I see some setMethods in the java.lang.Field class, but none in the java.lang.Class class. Is it possible to read in property value of f1 into field f1, etc. etc.??
What I want to do is to read in a property file and populate the property value into a MyObject object.
e.g. MyObject have fields String f1,int f2,String f3, etc.
and the properties file I read have key f1,f2,f3
I see some setMethods in the java.lang.Field class, but none in the java.lang.Class class. Is it possible to read in property value of f1 into field f1, etc. etc.??