code: protected List<MediaType> getProducibleMediaTypes(Class<?> returnValueClass) {
          if (!allSupportedMediaTypes.isEmpty()) {
              List<MediaType> result = new ArrayList<>();
              for (HttpMessageConverter<?> converter : messageConverters) {
                  if (converter.canWrite(returnValueClass, null)) {
                      result.addAll(converter.getSupportedMediaTypes());
                  }
              }
  
              return result;
          }
          else {
              return Collections.singletonList(MediaType.ALL);
          }
      }
docs: Returns the media types that can be produced:
  <ul>
  <li>Media types of configured converters that can write the specific return value, or</li>
  <li>{@link org.springframework.http.MediaType#ALL}</li>
  </ul>