Generic Getter and Setters
807589Nov 18 2008 — edited Nov 19 2008Hi all,
I want to dynamically access getter and setter methods depending on the variables i have
suppose i have a variable
String checkGetter;
and a getter method
public String getCheckGetter(){return this.checkGetter;}
and in addition to that some more variables and their getters and setters
and i want to access all the getter/setter methods dynamically ,if i am having only the variable name(as a String). I dont want to add code for accessing these methods, instead put in a loop and do my work.
Can one achieve this in Java.
Thanks in advance.
Regards.