code: private static List<MediaType> producibleMediaTypes(Method method, Class<?> clazz) {
          List<Produces> produces = findAll(method, Produces.class);
          List<ProduceType> produceTypes = findAll(method, ProduceType.class);
  
          if (produces.isEmpty() && produceTypes.isEmpty()) {
              produces = findAll(clazz, Produces.class);
              produceTypes = findAll(clazz, ProduceType.class);
          }
  
          final List<MediaType> types =
                  Stream.concat(produces.stream().map(Produces::value),
                                produceTypes.stream().map(ProduceType::value))
                        .map(MediaType::parse)
                        .peek(type -> {
                            if (type.hasWildcard()) {
                                throw new IllegalArgumentException(
                                        "Producible media types must not have a wildcard: " + type);
                            }
                        })
                        .collect(toImmutableList());
          return ensureUniqueTypes(types, Produces.class);
      }
docs: Returns the list of {@link MediaType}s specified by {@link Produces} annotation.