Package io.micronaut.http.bind.binders
Class RequestAttributeAnnotationBinder<T>
java.lang.Object
io.micronaut.core.bind.annotation.AbstractArgumentBinder<T>
io.micronaut.http.bind.binders.RequestAttributeAnnotationBinder<T>
- Type Parameters:
T- A type
- All Implemented Interfaces:
io.micronaut.core.bind.annotation.AnnotatedArgumentBinder<RequestAttribute,,T, HttpRequest<?>> io.micronaut.core.bind.ArgumentBinder<T,,HttpRequest<?>> AnnotatedRequestArgumentBinder<RequestAttribute,,T> PostponedRequestArgumentBinder<T>,RequestArgumentBinder<T>
public class RequestAttributeAnnotationBinder<T>
extends io.micronaut.core.bind.annotation.AbstractArgumentBinder<T>
implements AnnotatedRequestArgumentBinder<RequestAttribute,T>, PostponedRequestArgumentBinder<T>
An
AnnotatedArgumentBinder implementation that uses the RequestAttribute
annotation to trigger binding from an HTTP request attribute.
NOTE: The binder is annotating as postponed to allow injecting attributes added by filters.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder
io.micronaut.core.bind.ArgumentBinder.BindingResult<T extends Object> -
Field Summary
Fields inherited from class io.micronaut.core.bind.annotation.AbstractArgumentBinder
conversionService -
Constructor Summary
ConstructorsConstructorDescriptionRequestAttributeAnnotationBinder(io.micronaut.core.convert.ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.core.bind.ArgumentBinder.BindingResult<T>bind(io.micronaut.core.convert.ArgumentConversionContext<T> argument, HttpRequest<?> source) protected StringgetFallbackFormat(io.micronaut.core.type.Argument<?> argument) Methods inherited from class io.micronaut.core.bind.annotation.AbstractArgumentBinder
doBind, doBind, doConvert, doConvert, doResolveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.bind.binders.PostponedRequestArgumentBinder
bindPostponed
-
Constructor Details
-
RequestAttributeAnnotationBinder
public RequestAttributeAnnotationBinder(io.micronaut.core.convert.ConversionService conversionService) - Parameters:
conversionService- conversionService
-
-
Method Details
-
getAnnotationType
- Specified by:
getAnnotationTypein interfaceio.micronaut.core.bind.annotation.AnnotatedArgumentBinder<RequestAttribute,T, HttpRequest<?>>
-
bind
public io.micronaut.core.bind.ArgumentBinder.BindingResult<T> bind(io.micronaut.core.convert.ArgumentConversionContext<T> argument, HttpRequest<?> source) - Specified by:
bindin interfaceio.micronaut.core.bind.ArgumentBinder<T,HttpRequest<?>>
-
getFallbackFormat
- Overrides:
getFallbackFormatin classio.micronaut.core.bind.annotation.AbstractArgumentBinder<T>
-