@Nullable
    private static AnnotatedValueResolver ofInjectableTypes0(String name, AnnotatedElement annotatedElement,
                                                             Class<?> type, Type actual,
                                                             boolean useBlockingExecutor) {
        if (actual == RequestContext.class || actual == ServiceRequestContext.class) {
            return new Builder(annotatedElement, type, name)
                    .resolver((unused, ctx) -> ctx.context())
                    .build();
        }

        if (actual == Request.class || actual == HttpRequest.class) {
            return new Builder(annotatedElement, type, name)
                    .resolver((unused, ctx) -> ctx.request())
                    .build();
        }

        if (actual == HttpHeaders.class || actual == RequestHeaders.class) {
            return new Builder(annotatedElement, type, name)
                    .resolver((unused, ctx) -> ctx.request().headers())
                    .build();
        }

        if (actual == AggregatedHttpRequest.class) {
            return new Builder(annotatedElement, type, name)
                    .resolver((unused, ctx) -> ctx.aggregatedRequest())
                    .aggregation(AggregationStrategy.ALWAYS)
                    .build();
        }

        if (actual == QueryParams.class) {
            return new Builder(annotatedElement, type, name)
                    .resolver((unused, ctx) -> ctx.queryParams())
                    .aggregation(AggregationStrategy.FOR_FORM_DATA)
                    .build();
        }

        if (actual == Multipart.class) {
            return new Builder(annotatedElement, type, name)
                    .resolver((unused, ctx) -> Multipart.from(ctx.request()))
                    .build();
        }

        if (actual == MultipartFile.class) {
            return new Builder(annotatedElement, type, name)
                    .resolver((unused, ctx) -> {
                        final String filename = getName(annotatedElement);
                        final FileAggregatedMultipart aggregatedMultipart = ctx.aggregatedMultipart();
                        assert aggregatedMultipart != null;
                        return Iterables.getFirst(aggregatedMultipart.files().get(filename), null);
                    })
                    .aggregation(AggregationStrategy.ALWAYS)
                    .build();
        }

        if (actual == Cookies.class) {
            return new Builder(annotatedElement, type, name)
                    .resolver((unused, ctx) -> {
                        final String value = ctx.request().headers().get(HttpHeaderNames.COOKIE);
                        if (value == null) {
                            return Cookies.of();
                        }
                        return Cookie.fromCookieHeader(value);
                    })
                    .build();
        }

        if (actual instanceof Class && ScalaUtil.isExecutionContext((Class<?>) actual)) {
            return new Builder(annotatedElement, type, name)
                    .resolver((unused, ctx) -> {
                        if (useBlockingExecutor) {
                            return ExecutionContext.fromExecutorService(ctx.context().blockingTaskExecutor());
                        } else {
                            return ExecutionContext.fromExecutorService(ctx.context().eventLoop());
                        }
                    })
                    .build();
        }

        // Unsupported type.
        return null;
    }
Creates a new {@link AnnotatedValueResolver} instance if the specified {@code annotatedElement} is
a component of {@link AnnotatedService}.

@param annotatedElement an element which is annotated with a value specifier such as {@link Param} and
                        {@link Header}.
@param typeElement      an element which is used for retrieving its type and name.
@param type             a type of the given {@link Parameter} or {@link Field}. It is a type of
                        the specified {@code typeElement} parameter.
@param pathParams       a set of path variables.
@param objectResolvers  a list of {@link RequestObjectResolver} to be evaluated for the objects which
                        are annotated with {@link RequestObject} annotation.
@param implicitRequestObjectAnnotation {@code true} if an element is always treated like it is annotated
                                       with {@link RequestObject} so that conversion is always done.
                                       {@code false} if an element has to be annotated with
                                       {@link RequestObject} explicitly to get converted.
@param useBlockingExecutor whether to use blocking task executor
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java