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