private static BiFunction<AnnotatedValueResolver, ResolverContext, Object>
    resolver(List<RequestObjectResolver> objectResolvers, BeanFactoryId beanFactoryId) {
        return (resolver, ctx) -> {
            boolean found = false;
            Object value = null;
            for (final RequestObjectResolver objectResolver : objectResolvers) {
                try {
                    value = objectResolver.convert(ctx, resolver.elementType(),
                                                   resolver.parameterizedElementType(), beanFactoryId);
                    found = true;
                    break;
                } catch (FallthroughException ignore) {
                    // Do nothing.
                } catch (Throwable cause) {
                    Exceptions.throwUnsafely(cause);
                }
            }

            if (!found) {
                throw new IllegalArgumentException(
                        "No suitable request converter found for a @" +
                        RequestObject.class.getSimpleName() + " '" +
                        resolver.elementType().getSimpleName() + '\'');
            }

            if (value == null && resolver.shouldExist()) {
                throw new IllegalArgumentException(
                        "A request converter converted the request into null, but the injection target " +
                        "is neither an Optional nor annotated with @Nullable");
            }

            return value;
        };
    }
Returns a bean resolver which retrieves a value using request converters. If the target element
is an annotated bean, a bean factory of the specified {@link BeanFactoryId} will be used for creating an
instance.
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java