code: @SuppressWarnings("OptionalGetWithoutIsPresent") // Previous validation ensures this is fine.
    private ImmutableList<FieldSpec> adapterDependenciesInternal(
        Collection<AdapterDescriptor> adapters, Set<TypeName> scoped) {
  
      ImmutableList.Builder<FieldSpec> adapterFields = new ImmutableList.Builder<>();
      for (AdapterDescriptor adapter : adapters) {
        // Don't define the same adapter twice
        if (scoped.contains(adapter.typeName())) {
          continue;
        }
        scoped.add(adapter.typeName());
  
        if (!adapter.singletonInstance().isPresent()) {
          ConstructorInfo constructorInfo = adapter.constructorInfo().get();
  
          // Add dependencies, then create and add the current adapter
          List<AdapterDescriptor> adapterDependencies = new ArrayList<>();
          for (ConstructorInfo.Param param : constructorInfo.constructorParameters()) {
            if (param instanceof ConstructorInfo.AdapterParam) {
              adapterDependencies.add(((ConstructorInfo.AdapterParam) param).adapter);
            }
          }
          if (adapterDependencies.size() > 0) {
            adapterFields.addAll(adapterDependenciesInternal(adapterDependencies, scoped));
          }
  
          // Construct the single instance of this type adapter
          String adapterName = adapterNames.getName(adapter.typeName());
          CodeBlock parameters = getAdapterParameterList(constructorInfo);
          ParameterizedTypeName adapterInterfaceType =
              ParameterizedTypeName.get(TYPE_ADAPTER, adapter.adaptedTypeName());
  
          adapterFields.add(
              FieldSpec.builder(adapterInterfaceType, adapterName, STATIC, FINAL)
                  .initializer(CodeBlock.of("new $T($L)", adapter.typeName(), parameters))
                  .build());
        }
      }
  
      return adapterFields.build();
    }
docs: Returns a list of all of the {@link FieldSpec}s that define the required TypeAdapters