T
- A typepublic class RequestAttributeAnnotationBinder<T> extends AbstractAnnotatedArgumentBinder<RequestAttribute,T,HttpRequest<?>> implements AnnotatedRequestArgumentBinder<RequestAttribute,T>
AnnotatedArgumentBinder
implementation that uses the RequestAttribute
annotation to trigger binding from an HTTP request attribute.HttpAttributes
ArgumentBinder.BindingResult<T>
Constructor and Description |
---|
RequestAttributeAnnotationBinder(ConversionService<?> conversionService) |
Modifier and Type | Method and Description |
---|---|
ArgumentBinder.BindingResult<T> |
bind(ArgumentConversionContext<T> argument,
HttpRequest<?> source)
Bind the given argument from the given source.
|
java.lang.Class<RequestAttribute> |
getAnnotationType() |
protected java.lang.String |
getFallbackFormat(Argument argument) |
doBind, doBind, doConvert, doConvert, doResolve
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
of
public RequestAttributeAnnotationBinder(ConversionService<?> conversionService)
conversionService
- conversionServicepublic java.lang.Class<RequestAttribute> getAnnotationType()
getAnnotationType
in interface AnnotatedArgumentBinder<RequestAttribute,T,HttpRequest<?>>
public ArgumentBinder.BindingResult<T> bind(ArgumentConversionContext<T> argument, HttpRequest<?> source)
ArgumentBinder
bind
in interface ArgumentBinder<T,HttpRequest<?>>
argument
- The ArgumentConversionContext
source
- The sourceOptional
of the value. If no binding was possible Optional.empty()
protected java.lang.String getFallbackFormat(Argument argument)
getFallbackFormat
in class AbstractAnnotatedArgumentBinder<RequestAttribute,T,HttpRequest<?>>
argument
- The argument