Class CombinedMediaType.EffectiveMediaType

java.lang.Object
org.glassfish.jersey.server.internal.routing.CombinedMediaType.EffectiveMediaType
Enclosing class:
CombinedMediaType

static class CombinedMediaType.EffectiveMediaType extends Object
Media type extended by flag indicating whether media type was obtained from user annotations Consumes or Produces or has no annotation and therefore was derived from MessageBodyWorkers.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
    True if the MediaType was not defined by annotation and therefore was derived from Message Body Providers.
    private final javax.ws.rs.core.MediaType
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    EffectiveMediaType(String mediaTypeValue)
    Creates new instance with mediaType which was obtained from user annotations Consumes or Produces.
    EffectiveMediaType(javax.ws.rs.core.MediaType mediaType)
    Creates new instance with mediaType which was obtained from user annotations Consumes or Produces.
    EffectiveMediaType(javax.ws.rs.core.MediaType mediaType, boolean fromMessageBodyProviders)
    Creates new instance with mediaType and flag indicating the origin of the mediaType.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    javax.ws.rs.core.MediaType
    Returns MediaType.
    int
     
    (package private) boolean
    Return flag value whether the MediaType was not defined by annotation and therefore was derived from Message Body Providers.
    boolean
    Returns True if SubType of MediaType was originally defined as wildcard.
    boolean
    Returns true if Type of MediaType was originally defined as wildcard.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • derived

      private final boolean derived
      True if the MediaType was not defined by annotation and therefore was derived from Message Body Providers.
    • mediaType

      private final javax.ws.rs.core.MediaType mediaType
  • Constructor Details

    • EffectiveMediaType

      public EffectiveMediaType(javax.ws.rs.core.MediaType mediaType, boolean fromMessageBodyProviders)
      Creates new instance with mediaType and flag indicating the origin of the mediaType.
      Parameters:
      mediaType - The media type.
      fromMessageBodyProviders - True if mediaType was derived from MessageBodyWorkers.
    • EffectiveMediaType

      public EffectiveMediaType(String mediaTypeValue)
      Creates new instance with mediaType which was obtained from user annotations Consumes or Produces.
      Parameters:
      mediaTypeValue - The string media type.
    • EffectiveMediaType

      public EffectiveMediaType(javax.ws.rs.core.MediaType mediaType)
      Creates new instance with mediaType which was obtained from user annotations Consumes or Produces.
      Parameters:
      mediaType - The media type.
  • Method Details

    • isWildcardType

      public boolean isWildcardType()
      Returns true if Type of MediaType was originally defined as wildcard.
      Returns:
      Returns true if method Consumes or Produces was annotated with wildcard type (for example '*/*').
    • isWildcardSubType

      public boolean isWildcardSubType()
      Returns True if SubType of MediaType was originally defined as wildcard.
      Returns:
      Returns true if method Consumes or Produces was annotated with wildcard subtype (for example 'text/*').
    • getMediaType

      public javax.ws.rs.core.MediaType getMediaType()
      Returns MediaType.
      Returns:
      Media type.
    • isDerived

      boolean isDerived()
      Return flag value whether the MediaType was not defined by annotation and therefore was derived from Message Body Providers.
      Returns:
      true if the MediaType was not defined by annotation and therefore was derived from Message Body Providers, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object