Package io.micronaut.http.bind.binders
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 io.micronaut.core.bind.ArgumentBinder
ArgumentBinder.BindingResult<T>
-
Constructor Summary
ConstructorDescriptionDefaultUnmatchedRequestArgumentBinder
(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.
-
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
-
bind
public ArgumentBinder.BindingResult<T> bind(ArgumentConversionContext<T> context, HttpRequest<?> request) Description copied from interface:ArgumentBinder
Bind the given argument from the given source.- Specified by:
bind
in interfaceArgumentBinder<T,
HttpRequest<?>> - Parameters:
context
- TheArgumentConversionContext
request
- The source- Returns:
- An
Optional
of the value. If no binding was possibleOptional.empty()
-
bindPostponed
public ArgumentBinder.BindingResult<T> bindPostponed(ArgumentConversionContext<T> context, HttpRequest<?> request) Description copied from interface:PostponedRequestArgumentBinder
Bind postponed the given argument from the given source.- Specified by:
bindPostponed
in interfacePostponedRequestArgumentBinder<T>
- Parameters:
context
- TheArgumentConversionContext
request
- The request- Returns:
- An
Optional
of the value. If no binding was possibleOptional.empty()
-