接口 OperationArgumentResolver

所有已知实现类:
ProducibleOperationArgumentResolver

public interface OperationArgumentResolver
Resolver for an argument of an Operation.
从以下版本开始:
2.5.0
作者:
Andy Wilkinson
  • 方法详细资料

    • canResolve

      boolean canResolve(Class<?> type)
      Return whether an argument of the given type can be resolved.
      参数:
      type - argument type
      返回:
      true if an argument of the required type can be resolved, otherwise false
    • resolve

      <T> T resolve(Class<T> type)
      Resolves an argument of the given type.
      类型参数:
      T - required type of the argument
      参数:
      type - argument type
      返回:
      an argument of the required type, or null
    • of

      static <T> OperationArgumentResolver of(Class<T> type, Supplier<? extends T> supplier)
      Factory method that creates an OperationArgumentResolver for a specific type using a Supplier.
      类型参数:
      T - the resolvable type
      参数:
      type - the resolvable type
      supplier - the value supplier
      返回:
      an OperationArgumentResolver instance