Class HeaderAnnotationBinder<T>

java.lang.Object
io.micronaut.core.bind.annotation.AbstractArgumentBinder<T>
io.micronaut.http.bind.binders.HeaderAnnotationBinder<T>
Type Parameters:
T - A type
All Implemented Interfaces:
io.micronaut.core.bind.annotation.AnnotatedArgumentBinder<Header,T,HttpRequest<?>>, io.micronaut.core.bind.ArgumentBinder<T,HttpRequest<?>>, AnnotatedRequestArgumentBinder<Header,T>, RequestArgumentBinder<T>

public class HeaderAnnotationBinder<T> extends io.micronaut.core.bind.annotation.AbstractArgumentBinder<T> implements AnnotatedRequestArgumentBinder<Header,T>
An AnnotatedArgumentBinder implementation that uses the Header annotation to trigger binding from an HTTP header.
Since:
1.0
See Also:
  • Nested Class Summary

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

    io.micronaut.core.bind.ArgumentBinder.BindingResult<T extends Object>
  • Field Summary

    Fields inherited from class io.micronaut.core.bind.annotation.AbstractArgumentBinder

    conversionService
  • Constructor Summary

    Constructors
    Constructor
    Description
    HeaderAnnotationBinder(io.micronaut.core.convert.ConversionService conversionService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.micronaut.core.bind.ArgumentBinder.BindingResult<T>
    bind(io.micronaut.core.convert.ArgumentConversionContext<T> argument, HttpRequest<?> source)
     
     
    protected String
    getFallbackFormat(io.micronaut.core.type.Argument<?> argument)
     

    Methods inherited from class io.micronaut.core.bind.annotation.AbstractArgumentBinder

    doBind, doBind, doConvert, doConvert, doResolve

    Methods inherited from class java.lang.Object

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

    • HeaderAnnotationBinder

      public HeaderAnnotationBinder(io.micronaut.core.convert.ConversionService conversionService)
      Parameters:
      conversionService - The conversion service
  • Method Details

    • bind

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

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

      protected String getFallbackFormat(io.micronaut.core.type.Argument<?> argument)
      Overrides:
      getFallbackFormat in class io.micronaut.core.bind.annotation.AbstractArgumentBinder<T>