code: public static Field[] getAllFields(final Class<?> cls) {
          final List<Field> allFieldsList = getAllFieldsList(cls);
          return allFieldsList.toArray(new Field[allFieldsList.size()]);
      }
docs: Gets all fields of the given class and its parents (if any).
  
  @param cls
  the {@link Class} to query
  @return an array of Fields (possibly empty).
  @throws IllegalArgumentException
  if the class is {@code null}
  @since 3.2