摘要:
使用BeanUtils设置/读取属性的值以及默认支持的自动转化: @Test //使用BeanUtils设置/读取属性的值以及自动转化 public void test1() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException{ Person p=new Person(); ... 阅读全文
posted @ 2016-10-03 23:28
玮仔Wayne
阅读(360)
评论(0)
推荐(0)
摘要:
获取类bean中的所有属性: @Test //获取类bean中的所有属性 public void test1() throws Exception{ BeanInfo info = Introspector.getBeanInfo(Person.class); PropertyDescriptor[] decriptors = info.getPropertyDescrip... 阅读全文
posted @ 2016-10-03 23:15
玮仔Wayne
阅读(275)
评论(0)
推荐(0)
摘要:
示例类 @SuppressWarnings("unused") public class Person { public String Name; private int Age; public Gender Gender; private static String Species = "人类"; public Person(){ ... 阅读全文
posted @ 2016-10-03 19:11
玮仔Wayne
阅读(374)
评论(0)
推荐(0)
浙公网安备 33010602011771号