Package org.springframework.data.web
Class OffsetScrollPositionHandlerMethodArgumentResolver
java.lang.Object
org.springframework.data.web.OffsetScrollPositionHandlerMethodArgumentResolverSupport
org.springframework.data.web.OffsetScrollPositionHandlerMethodArgumentResolver
- All Implemented Interfaces:
OffsetScrollPositionArgumentResolver
,HandlerMethodArgumentResolver
public class OffsetScrollPositionHandlerMethodArgumentResolver
extends OffsetScrollPositionHandlerMethodArgumentResolverSupport
implements OffsetScrollPositionArgumentResolver
HandlerMethodArgumentResolver
to automatically create OffsetScrollPosition
instances from request
parameters.- Since:
- 3.2
- Author:
- Yanming Zhou
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolveArgument
(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) Resolves aOffsetScrollPosition
method parameter into an argument value from a given request.boolean
supportsParameter
(MethodParameter parameter) Methods inherited from class org.springframework.data.web.OffsetScrollPositionHandlerMethodArgumentResolverSupport
getOffsetParameter, setOffsetParameter, setQualifierDelimiter
-
Constructor Details
-
OffsetScrollPositionHandlerMethodArgumentResolver
public OffsetScrollPositionHandlerMethodArgumentResolver()
-
-
Method Details
-
supportsParameter
- Specified by:
supportsParameter
in interfaceHandlerMethodArgumentResolver
-
resolveArgument
public Object resolveArgument(MethodParameter parameter, @Nullable ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable WebDataBinderFactory binderFactory) Description copied from interface:OffsetScrollPositionArgumentResolver
Resolves aOffsetScrollPosition
method parameter into an argument value from a given request. Supports also wrapped arguments inOptional
.- Specified by:
resolveArgument
in interfaceHandlerMethodArgumentResolver
- Specified by:
resolveArgument
in interfaceOffsetScrollPositionArgumentResolver
- Parameters:
parameter
- the method parameter to resolve. This parameter must have previously been passed toHandlerMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter)
which must have returnedtrue
.mavContainer
- the ModelAndViewContainer for the current requestwebRequest
- the current requestbinderFactory
- a factory for creatingWebDataBinder
instances- Returns:
- the resolved argument value or null if the value cannot be resolved. The returned value
considers
Optional
wrapping by returing either the value wrapped within Optional or Optional.empty().
-