獲取實體類的屬性數量

使用反射技術,獲取Field集合,而後獲得集合的長度就能夠 Field[] s = A.class.getDeclaredFields(); System.out.println(s.length);get

相關文章
相關標籤/搜索