Class QueryValueArgumentBinder<T>

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.micronaut.core.bind.ArgumentBinder

        io.micronaut.core.bind.ArgumentBinder.BindingResult<T extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryValueArgumentBinder​(io.micronaut.core.convert.ConversionService<?> conversionService)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.micronaut.core.bind.ArgumentBinder.BindingResult<T> bind​(io.micronaut.core.convert.ArgumentConversionContext<T> context, HttpRequest<?> source)
      Binds the argument with QueryValue annotation to the request (Also binds without annotation if request body is not permitted).
      java.lang.Class<QueryValue> getAnnotationType()  
      • Methods inherited from class io.micronaut.core.bind.annotation.AbstractAnnotatedArgumentBinder

        doBind, doBind, doConvert, doConvert, doResolve, getFallbackFormat
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueryValueArgumentBinder

        public QueryValueArgumentBinder​(io.micronaut.core.convert.ConversionService<?> conversionService)
        Constructor.
        Parameters:
        conversionService - conversion service
    • Method Detail

      • getAnnotationType

        public java.lang.Class<QueryValue> getAnnotationType()
        Specified by:
        getAnnotationType in interface io.micronaut.core.bind.annotation.AnnotatedArgumentBinder<QueryValue,​T,​HttpRequest<?>>
      • bind

        public io.micronaut.core.bind.ArgumentBinder.BindingResult<T> bind​(io.micronaut.core.convert.ArgumentConversionContext<T> context,
                                                                           HttpRequest<?> source)
        Binds the argument with QueryValue annotation to the request (Also binds without annotation if request body is not permitted). It will first try to convert to ConvertibleMultiValues type and if conversion is successful, add the corresponding parameters to the request. (By default the conversion will be successful if the Format annotation is present and has one of the supported values - see MultiValuesConverterFactory for specific converters). Otherwise the uri template will be used to deduce what will be done with the request. For example, simple parameters are converted to String
        Specified by:
        bind in interface io.micronaut.core.bind.ArgumentBinder<T,​HttpRequest<?>>