Package io.micronaut.http.bind.binders
Class RequestBeanAnnotationBinder<T>
java.lang.Object
io.micronaut.http.bind.binders.RequestBeanAnnotationBinder<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
AnnotatedArgumentBinder<RequestBean,
,T, HttpRequest<?>> ArgumentBinder<T,
,HttpRequest<?>> AnnotatedRequestArgumentBinder<RequestBean,
,T> PostponedRequestArgumentBinder<T>
,RequestArgumentBinder<T>
public class RequestBeanAnnotationBinder<T>
extends Object
implements AnnotatedRequestArgumentBinder<RequestBean,T>, PostponedRequestArgumentBinder<T>
Used to bind Bindable parameters to a Bean object.
NOTE: The binder is annotating as postponed to allow injecting values added by filters.
- Since:
- 2.0
- Author:
- Anze Sodja, graemerocher
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder
ArgumentBinder.BindingResult<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbind
(ArgumentConversionContext<T> context, HttpRequest<?> source) Bind the given argument from the given source.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.bind.binders.PostponedRequestArgumentBinder
bindPostponed
Methods inherited from interface io.micronaut.http.bind.binders.RequestArgumentBinder
createSpecific
-
Constructor Details
-
RequestBeanAnnotationBinder
- Parameters:
requestBinderRegistry
- Original request binder registry
-
-
Method Details
-
getAnnotationType
- Specified by:
getAnnotationType
in interfaceAnnotatedArgumentBinder<RequestBean,
T, HttpRequest<?>> - Returns:
- The annotation type.
-
bind
public ArgumentBinder.BindingResult<T> bind(ArgumentConversionContext<T> context, HttpRequest<?> source) Description copied from interface:ArgumentBinder
Bind the given argument from the given source.- Specified by:
bind
in interfaceArgumentBinder<T,
HttpRequest<?>> - Parameters:
context
- TheArgumentConversionContext
source
- The source- Returns:
- An
Optional
of the value. If no binding was possibleOptional.empty()
-