Interface OperationArgumentResolver

All Known Implementing Classes:
ProducibleOperationArgumentResolver

public interface OperationArgumentResolver
Resolver for an argument of an Operation.
Since:
2.5.0
Author:
Andy Wilkinson
  • Method Details

    • canResolve

      boolean canResolve(Class<?> type)
      Return whether an argument of the given type can be resolved.
      Parameters:
      type - argument type
      Returns:
      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.
      Type Parameters:
      T - required type of the argument
      Parameters:
      type - argument type
      Returns:
      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.
      Type Parameters:
      T - the resolvable type
      Parameters:
      type - the resolvable type
      supplier - the value supplier
      Returns:
      an OperationArgumentResolver instance