org.springframework.data.web

## Class SortHandlerMethodArgumentResolver

- java.lang.Object
- - org.springframework.data.web.SortHandlerMethodArgumentResolverSupport
  - - org.springframework.data.web.SortHandlerMethodArgumentResolver

All Implemented Interfaces:
  SortArgumentResolver, HandlerMethodArgumentResolver

Direct Known Subclasses:
  HateoasSortHandlerMethodArgumentResolver

    public class SortHandlerMethodArgumentResolver
    extends SortHandlerMethodArgumentResolverSupport
    implements SortArgumentResolver

`HandlerMethodArgumentResolver` to automatically create `Sort` instances from request parameters or `SortDefault` annotations.

Since:
  1.6
Author:
  Oliver Gierke, Thomas Darimont, Nick Williams, Mark Paluch, Christoph Strobl

### Constructor Summary

Constructors
Constructor and Description
`SortHandlerMethodArgumentResolver()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Sort` `resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory)` Resolves a `Sort` method parameter into an argument value from a given request.
`boolean` `supportsParameter(MethodParameter parameter)`

### Methods inherited from class org.springframework.data.web.SortHandlerMethodArgumentResolverSupport

`foldIntoExpressions, getDefaultFromAnnotationOrFallback, getPropertyDelimiter, getSortParameter, legacyFoldExpressions, setFallbackSort, setPropertyDelimiter, setQualifierDelimiter, setSortParameter`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SortHandlerMethodArgumentResolver

    public SortHandlerMethodArgumentResolver()

### Method Detail

#### supportsParameter

    public boolean supportsParameter(MethodParameter parameter)

Specified by:
  `supportsParameter` in interface `HandlerMethodArgumentResolver`

#### resolveArgument

    public Sort resolveArgument(MethodParameter parameter,
                                @Nullable
                                ModelAndViewContainer mavContainer,
                                NativeWebRequest webRequest,
                                @Nullable
                                WebDataBinderFactory binderFactory)

Description copied from interface: `SortArgumentResolver`
Resolves a `Sort` method parameter into an argument value from a given request.

Specified by:
  `resolveArgument` in interface `SortArgumentResolver`
Specified by:
  `resolveArgument` in interface `HandlerMethodArgumentResolver`
Parameters:
  `parameter` - the method parameter to resolve. This parameter must have previously been passed to `HandlerMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter)` which must have returned `true`.
  `mavContainer` - the ModelAndViewContainer for the current request
  `webRequest` - the current request
  `binderFactory` - a factory for creating `WebDataBinder` instances
Returns:
  the resolved argument value, or `null`