private static void forEachField(final Class<?> aClass, final BooleanFunction<? super Field> func) {
    for (Class<?> from = aClass; from != null && !Object.class.equals(from); from = from.getSuperclass()) {
      for (Field field : from.getDeclaredFields()) {
        try {
          if (!field.isAccessible()) {
            field.setAccessible(true);
          }
          if (!func.fun(field)) {
            return;
          }
        }
        catch (Throwable ignored) {
        }
      }
    }
  }
private static void forEachField(final Class<?> aClass, final BooleanFunction<? super Field> func)