Interface ArgumentBinder<T,​S>

  • Type Parameters:
    T - The argument type
    S - The source type
    All Known Subinterfaces:
    AnnotatedArgumentBinder<A,​T,​S>, BeanPropertyBinder, TypeArgumentBinder<T,​S>
    All Known Implementing Classes:
    AbstractAnnotatedArgumentBinder
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ArgumentBinder<T,​S>

    An interface capable of binding the value of an Argument from a source

    .

    The selection of an ArgumentBinder is done by the ArgumentBinderRegistry. Selection could be based on type, annotation or other factors such as the request media type

    Unlike TypeConverter instances binders can potentially handle complex objects and typically work on conjunction with a ConvertibleValues instance

    An ArgumentBinder can either be registered as a bean or by META-INF/services. In the case of the latter it will be globally available at all times, whilst the former is only present when a io.micronaut.context.BeanContext is initialized

    Since:
    1.0
    See Also:
    TypeConverter, ConvertibleValues