code: private static void collectFields(Class<?> type, List<Field> fields) {
          final Field[] declaredFields = type.getDeclaredFields();
          for (Field declaredField : declaredFields) {
              if (isPersistable(declaredField)) {
                  fields.add(declaredField);
              }
          }
          if (type.getSuperclass() != null) {
              collectFields(type.getSuperclass(), fields);
          }
      }
docs: ----------------------------------------------------------------------------------------------------------------------