private Class<?> getElementType(Type parameterizedType, boolean unwrapOptional) {
            if (!(parameterizedType instanceof ParameterizedType)) {
                return toRawType(unwrapOptional ? parameterizedType : type);
            }

            final Type elementType;
            try {
                elementType = ((ParameterizedType) parameterizedType).getActualTypeArguments()[0];
            } catch (Throwable cause) {
                throw new IllegalArgumentException(
                        "Unsupported or invalid parameter type: " + parameterizedType, cause);
            }
            return toRawType(elementType);
        }
Sets an {@link AggregationStrategy} for the element.
core/src/main/java/com/linecorp/armeria/internal/server/annotation/AnnotatedValueResolver.java