two class:
public class BaseDo<K> {
protected K id;
public K getId() {
return id;
}
public void setId(K id) {
this.id = id;
}
}
public class BeanDo extends BaseDo<Integer> {
private String beanName;
public String getBeanName() {
return beanName;
}
public void setBeanName(String beanName) {
this.beanName = beanName;
}
}
I want use reflect to implment like this:
BeanDo beanDo = new BeanDo();
beanDo.setId("string here");
Integer type reference String type value. who can help me?