- Object obj = Class.forName("domain.Test").newInstance();
- BeanWrapper wrapper = new BeanWrapperImpl(obj); //BeanWrapper实现了Wrapper接口
- wrapper.setPropertyValue("testN","sasa");
- Test te = (Test)obj;
- System.out.println(te.getTestN());
关于BeanWrapper的运用
最新推荐文章于 2024-09-21 08:19:51 发布