T
- A typepublic class HeaderAnnotationBinder<T> extends AbstractAnnotatedArgumentBinder<Header,T,HttpRequest<?>> implements AnnotatedRequestArgumentBinder<Header,T>
AnnotatedArgumentBinder
implementation that uses the Header
annotation to trigger binding from an HTTP header.HttpHeaders
ArgumentBinder.BindingResult<T>
Constructor and Description |
---|
HeaderAnnotationBinder(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.
|
Class<Header> |
getAnnotationType() |
protected String |
getFallbackFormat(Argument argument) |
doBind, doConvert, doResolve
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
of
public HeaderAnnotationBinder(ConversionService<?> conversionService)
conversionService
- The conversion servicepublic 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()
public Class<Header> getAnnotationType()
getAnnotationType
in interface AnnotatedArgumentBinder<Header,T,HttpRequest<?>>
protected String getFallbackFormat(Argument argument)
getFallbackFormat
in class AbstractAnnotatedArgumentBinder<Header,T,HttpRequest<?>>
argument
- The argument