Field[] fields = t.getClass().getDeclaredFields();
//这里为了剔除serialVersionUID
Field[] tempArr = new Field[fields.length-1];
int a = 0;
for(Field s:fields){
//匹配是否为静态常量
if( Modifier.isStatic(s.getModifiers())) {
continue;
}
tempArr[a] = s;
a++;
}

相关文章:

  • 2021-04-17
  • 2022-12-23
  • 2021-05-01
  • 2022-12-23
  • 2021-03-31
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2021-05-04
  • 2021-08-23
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案