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 ArgumentBinder
ArgumentBinder.BindingResult<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind(ArgumentConversionContext<T> context, HttpRequest<?> source) Bind the given argument from the given source.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PostponedRequestArgumentBinder
bindPostponedMethods inherited from interface RequestArgumentBinder
createSpecific
-
Constructor Details
-
RequestBeanAnnotationBinder
- Parameters:
requestBinderRegistry- Original request binder registry
-
-
Method Details
-
getAnnotationType
- Specified by:
getAnnotationTypein interfaceAnnotatedArgumentBinder<RequestBean, T, HttpRequest<?>>- Returns:
- The annotation type.
-
bind
public ArgumentBinder.BindingResult<T> bind(ArgumentConversionContext<T> context, HttpRequest<?> source) Description copied from interface:ArgumentBinderBind the given argument from the given source.- Specified by:
bindin interfaceArgumentBinder<T, HttpRequest<?>>- Parameters:
context- TheArgumentConversionContextsource- The source- Returns:
- An
Optionalof the value. If no binding was possibleOptional.empty()
-