Class DefaultUnmatchedRequestArgumentBinder<T>
java.lang.Object
io.micronaut.http.bind.binders.DefaultUnmatchedRequestArgumentBinder<T>
- Type Parameters:
T- A type
- All Implemented Interfaces:
ArgumentBinder<T, HttpRequest<?>>, PostponedRequestArgumentBinder<T>, RequestArgumentBinder<T>, UnmatchedRequestArgumentBinder
@Internal
public final class DefaultUnmatchedRequestArgumentBinder<T>
extends Object
implements PostponedRequestArgumentBinder<T>, UnmatchedRequestArgumentBinder
The binder will try to bind the argument value which wasn't matched by an annotation or a type.
- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from interface ArgumentBinder
ArgumentBinder.BindingResult<T> -
Constructor Summary
ConstructorsConstructorDescriptionDefaultUnmatchedRequestArgumentBinder(List<RequestArgumentBinder<Object>> internalPreUnmatchedArgumentBinders, List<RequestArgumentBinder<Object>> unmatchedArgumentBinders, List<RequestArgumentBinder<Object>> internalPostUnmatchedArgumentBinders) -
Method Summary
Modifier and TypeMethodDescriptionbind(ArgumentConversionContext<T> context, HttpRequest<?> request) Bind the given argument from the given source.bindPostponed(ArgumentConversionContext<T> context, HttpRequest<?> request) Bind postponed the given argument from the given source.createSpecific(Argument<T> argument) Create a specific binder.
-
Constructor Details
-
DefaultUnmatchedRequestArgumentBinder
public DefaultUnmatchedRequestArgumentBinder(List<RequestArgumentBinder<Object>> internalPreUnmatchedArgumentBinders, List<RequestArgumentBinder<Object>> unmatchedArgumentBinders, List<RequestArgumentBinder<Object>> internalPostUnmatchedArgumentBinders) - Parameters:
internalPreUnmatchedArgumentBinders- The internal pre unmatched bindersunmatchedArgumentBinders- The unmatched bindersinternalPostUnmatchedArgumentBinders- The internal post unmatched binders
-
-
Method Details
-
createSpecific
Description copied from interface:RequestArgumentBinderCreate a specific binder.- Specified by:
createSpecificin interfaceArgumentBinder<T, HttpRequest<?>>- Specified by:
createSpecificin interfaceRequestArgumentBinder<T>- Parameters:
argument- The bound argument- Returns:
- The specific binder
-
bind
public ArgumentBinder.BindingResult<T> bind(ArgumentConversionContext<T> context, HttpRequest<?> request) Description copied from interface:ArgumentBinderBind the given argument from the given source.- Specified by:
bindin interfaceArgumentBinder<T, HttpRequest<?>>- Parameters:
context- TheArgumentConversionContextrequest- The source- Returns:
- An
Optionalof the value. If no binding was possibleOptional.empty()
-
bindPostponed
public ArgumentBinder.BindingResult<T> bindPostponed(ArgumentConversionContext<T> context, HttpRequest<?> request) Description copied from interface:PostponedRequestArgumentBinderBind postponed the given argument from the given source.- Specified by:
bindPostponedin interfacePostponedRequestArgumentBinder<T>- Parameters:
context- TheArgumentConversionContextrequest- The request- Returns:
- An
Optionalof the value. If no binding was possibleOptional.empty()
-