All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cc.shacocloud.mirage.web.HandleMethodArgumentResolver Maven / Gradle / Ivy

package cc.shacocloud.mirage.web;

import cc.shacocloud.mirage.web.bind.WebDataBinderFactory;
import io.vertx.core.Future;
import org.springframework.core.MethodParameter;
import org.jetbrains.annotations.Nullable;

/**
 * 处理方法参数解析器
 */
public interface HandleMethodArgumentResolver {

    /**
     * 是否支持出来该方法参数
     *
     * @param parameter 参数
     * @return 如果支持返回 {@code true} 反之为 {@code false}
     */
    boolean supportsParameter(MethodParameter parameter);

    /**
     * 解析参数
     */
    Future resolveArgument(HttpRequest request, MethodParameter parameter, @Nullable WebDataBinderFactory binderFactory);

}