private static Iterable getTypeVariables()

in dataenum-processor/src/main/java/com/spotify/dataenum/processor/generator/data/OutputValueFactory.java [98:109]


  private static Iterable<TypeVariableName> getTypeVariables(
      Value value, Iterable<TypeVariableName> typeVariables) {
    Set<TypeVariableName> output = new LinkedHashSet<>();
    for (TypeVariableName typeVariable : typeVariables) {
      for (Parameter parameter : value.parameters()) {
        if (typeNeedsTypeVariable(parameter.type(), typeVariable)) {
          output.add(typeVariable);
        }
      }
    }
    return output;
  }