static AggregationType aggregationType(AggregationStrategy strategy, RequestHeaders headers) {
        requireNonNull(strategy, "strategy");
        final MediaType mediaType = headers.contentType();
        if (isMultipartFormData(mediaType)) {
            if (strategy == AggregationStrategy.NONE) {
                return AggregationType.NONE;
            }
            return AggregationType.MULTIPART;
        }

        switch (strategy) {
            case ALWAYS:
                return AggregationType.ALL;
            case FOR_FORM_DATA:
                return isFormData(mediaType) ? AggregationType.ALL : AggregationType.NONE;
        }
        return AggregationType.NONE;
    }
Sets an {@link AggregationStrategy} for the element.
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java