获取实体类的属性数量

使用反射技术,获取Field集合,而后获得集合的长度就能够 Field[] s = A.class.getDeclaredFields(); System.out.println(s.length);get

相关文章
相关标签/搜索