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
if you are using java.lang.reflect.Field, the "setter" is Field.set(Object,Object) and the "getter" is Field.get(Object). in both cases, the first parameter is the instance on which you want to access the field.
java.lang.reflect.Field
Field.set(Object,Object)
Field.get(Object)