Field[] fields = clazz.getDeclaredFields(); Class<?> superClass = clazz.getSuperclass(); Field[] fields2 = superClass.getDeclaredFields(); List<Field> list = new ArrayList(Arrays.asList(fields)); List<Field> list2 = Arrays.asList(fields2); list.addAll(new ArrayList(list2));
ref : http://blog.csdn.net/thunderous/article/details/3693362
时间: 2024-10-10 08:51:53