Field[] fields = TbRawMaterialController.class.getDeclaredFields();
            Arrays.stream(fields).forEach(field -> {
                    String fieldName = field.getName();
                    Class<?> type = field.getType();
                try {
                    field.setAccessible(true);
                    if(!Modifier.isAbstract(field.getModifiers())&&!type.isInterface()){
                        Object o = field.get(TbRawMaterialController.class);
                        map.put(fieldName,o);
                    }
                }catch (Exception e){

                }
            });

 

相关文章:

  • 2022-12-23
  • 2021-11-27
  • 2021-10-19
  • 2022-01-13
  • 2022-01-06
  • 2021-10-12
  • 2021-05-22
猜你喜欢
  • 2022-12-23
  • 2021-06-14
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案