Class DefaultUnmatchedRequestArgumentBinder<T>

java.lang.Object
io.micronaut.http.bind.binders.DefaultUnmatchedRequestArgumentBinder<T>
Type Parameters:
T - A type
All Implemented Interfaces:
io.micronaut.core.bind.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
  • Constructor Details

    • DefaultUnmatchedRequestArgumentBinder

      public DefaultUnmatchedRequestArgumentBinder(List<RequestArgumentBinder<Object>> internalPreUnmatchedArgumentBinders, List<RequestArgumentBinder<Object>> unmatchedArgumentBinders, List<RequestArgumentBinder<Object>> internalPostUnmatchedArgumentBinders)
      Parameters:
      internalPreUnmatchedArgumentBinders - The internal pre unmatched binders
      unmatchedArgumentBinders - The unmatched binders
      internalPostUnmatchedArgumentBinders - The internal post unmatched binders
  • Method Details

    • bind

      public io.micronaut.core.bind.ArgumentBinder.BindingResult<T> bind(io.micronaut.core.convert.ArgumentConversionContext<T> context, HttpRequest<?> request)
      Specified by:
      bind in interface io.micronaut.core.bind.ArgumentBinder<T,HttpRequest<?>>
    • bindPostponed

      public io.micronaut.core.bind.ArgumentBinder.BindingResult<T> bindPostponed(io.micronaut.core.convert.ArgumentConversionContext<T> context, HttpRequest<?> request)
      Description copied from interface: PostponedRequestArgumentBinder
      Bind postponed the given argument from the given source.
      Specified by:
      bindPostponed in interface PostponedRequestArgumentBinder<T>
      Parameters:
      context - The ArgumentConversionContext
      request - The request
      Returns:
      An Optional of the value. If no binding was possible Optional.empty()