Interface MethodArgumentResolver

All Known Subinterfaces:
ArgumentResolverComposite
All Known Implementing Classes:
BeanArgumentResolver, CachedArgumentResolverComposite, ContextArgumentResolverComposite, LocaleArgumentResolver, MethodArgumentResolverComposite, TypedArgumentResolver, UserArgumentResolver

public interface MethodArgumentResolver
Strategy interface to handle the value returned from the invocation of a handler method .
  • Method Summary

    Modifier and Type
    Method
    Description
    resolveArgument(org.springframework.core.MethodParameter parameter)
    Resolves a method parameter into an argument value.
    boolean
    supportsParameter(org.springframework.core.MethodParameter parameter)
    Whether the given method parameter is supported by this resolver.
  • Method Details

    • supportsParameter

      boolean supportsParameter(org.springframework.core.MethodParameter parameter)
      Whether the given method parameter is supported by this resolver.
      Parameters:
      parameter - the method parameter to check
      Returns:
      true if this resolver supports the supplied parameter; false otherwise
    • resolveArgument

      @Nullable Object resolveArgument(org.springframework.core.MethodParameter parameter) throws Exception
      Resolves a method parameter into an argument value.
      Parameters:
      parameter - the method parameter to resolve. This parameter must have previously been passed to supportsParameter(org.springframework.core.MethodParameter) which must have returned true.
      Returns:
      the resolved argument value, or null if not resolvable
      Throws:
      Exception - in case of errors with the preparation of argument values