private static Set<MediaType> producibleMediaTypes(Method method, Class<?> clazz) {
        List<Produces> produces = AnnotationUtil.findAll(method, Produces.class);

        if (produces.isEmpty()) {
            produces = AnnotationUtil.findAll(clazz, Produces.class);
        }

        final List<MediaType> types =
                produces.stream()
                        .map(Produces::value)
                        .map(MediaType::parse)
                        .peek(type -> {
                            if (type.hasWildcard()) {
                                throw new IllegalArgumentException(
                                        "Producible media types must not have a wildcard: " + type);
                            }
                        })
                        .collect(toImmutableList());
        return listToSet(types, Produces.class);
    }
Returns the list of {@link MediaType}s specified by {@link Produces} annotation.
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedServiceFactory.java