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.HttpHeadersArgumentBinder.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, doResolveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitofpublic HeaderAnnotationBinder(ConversionService<?> conversionService)
conversionService - The conversion servicepublic ArgumentBinder.BindingResult<T> bind(ArgumentConversionContext<T> argument, HttpRequest<?> source)
ArgumentBinderbind in interface ArgumentBinder<T,HttpRequest<?>>argument - The ArgumentConversionContextsource - 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