I am working on Android Studio, and I want to accomplish the following:
I have this class with some variables:
class test {
private String prop1;
private int prop2;
private boolean prop3;
}
I want to create a 'generic' method which can change some variable to a new value, like:
public changeVar(Variable var, Value val) {
this.var = val;
}
I was wondering if there is any clever way of doing that without the need to make tens of set methods for each variable.
Thank you.