Class ProducesMediaTypeQualifier<T>

java.lang.Object
io.micronaut.web.router.qualifier.ProducesMediaTypeQualifier<T>
Type Parameters:
T - The Type
All Implemented Interfaces:
io.micronaut.context.Qualifier<T>

public class ProducesMediaTypeQualifier<T> extends Object implements io.micronaut.context.Qualifier<T>
A Bean Qualifier that qualifies based on the value of the media type defined in the Produces annotation.
Since:
1.0
  • Field Summary

    Fields inherited from interface io.micronaut.context.Qualifier

    PRIMARY
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProducesMediaTypeQualifier(io.micronaut.http.MediaType contentType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    <BT extends io.micronaut.inject.BeanType<T>>
    Stream<BT>
    reduce(Class<T> beanType, Stream<BT> candidates)
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.micronaut.context.Qualifier

    contains, doesQualify, doesQualify, filter, qualify
  • Constructor Details

    • ProducesMediaTypeQualifier

      public ProducesMediaTypeQualifier(io.micronaut.http.MediaType contentType)
      Parameters:
      contentType - The content type as MediaType
  • Method Details

    • reduce

      public <BT extends io.micronaut.inject.BeanType<T>> Stream<BT> reduce(Class<T> beanType, Stream<BT> candidates)
      Specified by:
      reduce in interface io.micronaut.context.Qualifier<T>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object