public static CompletableFuture<List<Field>> allFields(ReferenceType type) {
    if (type instanceof ReferenceTypeImpl && isAsyncEnabled()) {
      return reschedule(((ReferenceTypeImpl)type).allFieldsAsync());
    }
    return completedFuture(type.allFields());
  }
public static CompletableFuture<List<Field>> allFields(ReferenceType type)