I have an object that has a String field. I can obtain this field by calling:
Field field = someObj.getClass().getField(\"strField\");
I sett a
Easiest way is to use BeanUtils:
String s = BeanUtils.getProperty(someObj, "strField");
Note that BeanUtils will attempt to convert your property into string. You need to have a getter and setter of the property