private static <T extends Annotation> void setAdditionalHeader(HttpHeadersBuilder headers,
                                                                   AnnotatedElement element,
                                                                   String clsAlias,
                                                                   String elementAlias,
                                                                   String level,
                                                                   Class<T> annotation,
                                                                   Function<T, String> nameGetter,
                                                                   Function<T, String[]> valueGetter) {
        requireNonNull(headers, "headers");
        requireNonNull(element, "element");
        requireNonNull(level, "level");

        final Set<String> addedHeaderSets = new HashSet<>();
        AnnotationUtil.findAll(element, annotation).forEach(header -> {
            final String name = nameGetter.apply(header);
            final String[] value = valueGetter.apply(header);

            if (addedHeaderSets.contains(name)) {
                logger.warn("The additional {} named '{}' at '{}' is set at the same {} level already;" +
                            "ignoring.",
                            clsAlias, name, elementAlias, level);
                return;
            }
            headers.set(HttpHeaderNames.of(name), value);
            addedHeaderSets.add(name);
        });
    }
Returns the list of {@link AnnotatedService} defined by {@link Path} and HTTP method annotations
from the specified {@code object}, {@link RequestConverterFunction}s, {@link ResponseConverterFunction}s,
{@link ExceptionHandlerFunction}s and {@link AnnotatedServiceExtensions}.
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedServiceFactory.java