private static BiFunction<AnnotatedValueResolver, ResolverContext, Object>
    resolver(Function<ResolverContext, List<String>> getter, Supplier<String> failureMessageSupplier,
             @Nullable String queryDelimiter) {
        return (resolver, ctx) -> {
            final List<String> values = getter.apply(ctx);
            if (!resolver.hasContainer()) {
                if (values != null && !values.isEmpty()) {
                    return resolver.convert(values.get(0));
                }
                return resolver.defaultOrException();
            }

            try {
                assert resolver.containerType() != null;
                @SuppressWarnings("unchecked")
                final Collection<Object> resolvedValues =
                        (Collection<Object>) resolver.containerType().getDeclaredConstructor().newInstance();

                // Do not convert value here because the element type is String.
                if (values != null && !values.isEmpty()) {
                    if (values.size() == 1 && values.get(0).isEmpty()) {
                        return resolvedValues;
                    }
                    if (queryDelimiter != null && values.size() == 1) {
                        final String first = values.get(0);
                        Splitter.on(queryDelimiter)
                                .splitToStream(first)
                                .map(resolver::convert)
                                .forEach(resolvedValues::add);
                    } else {
                        values.stream().map(resolver::convert).forEach(resolvedValues::add);
                    }
                } else {
                    final Object defaultValue = resolver.defaultOrException();
                    if (defaultValue != null) {
                        resolvedValues.add(defaultValue);
                    }
                }
                return resolvedValues;
            } catch (Throwable cause) {
                throw new IllegalArgumentException(failureMessageSupplier.get(), cause);
            }
        };
    }
Returns a collection value resolver which retrieves a list of string from the specified {@code getter}
and adds them to the specified collection data type.
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java