Class CombinedMediaType.EffectiveMediaType
- java.lang.Object
-
- org.glassfish.jersey.server.internal.routing.CombinedMediaType.EffectiveMediaType
-
- Enclosing class:
- CombinedMediaType
static class CombinedMediaType.EffectiveMediaType extends java.lang.Object
Media type
extended by flag indicating whether media type was obtained from user annotationsConsumes
orProduces
or has no annotation and therefore was derived fromMessageBodyWorkers
.
-
-
Constructor Summary
Constructors Constructor Description EffectiveMediaType(java.lang.String mediaTypeValue)
Creates new instance withmediaType
which was obtained from user annotationsConsumes
orProduces
.EffectiveMediaType(javax.ws.rs.core.MediaType mediaType)
Creates new instance withmediaType
which was obtained from user annotationsConsumes
orProduces
.EffectiveMediaType(javax.ws.rs.core.MediaType mediaType, boolean fromMessageBodyProviders)
Creates new instance withmediaType
and flag indicating the origin of the mediaType.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
javax.ws.rs.core.MediaType
getMediaType()
ReturnsMediaType
.int
hashCode()
(package private) boolean
isDerived()
Return flag value whether theMediaType
was not defined by annotation and therefore was derived from Message Body Providers.boolean
isWildcardSubType()
Returns True if SubType ofMediaType
was originally defined as wildcard.boolean
isWildcardType()
Returns true if Type ofMediaType
was originally defined as wildcard.java.lang.String
toString()
-
-
-
Constructor Detail
-
EffectiveMediaType
public EffectiveMediaType(javax.ws.rs.core.MediaType mediaType, boolean fromMessageBodyProviders)
Creates new instance withmediaType
and flag indicating the origin of the mediaType.- Parameters:
mediaType
- The media type.fromMessageBodyProviders
- True ifmediaType
was derived fromMessageBodyWorkers
.
-
EffectiveMediaType
public EffectiveMediaType(java.lang.String mediaTypeValue)
Creates new instance withmediaType
which was obtained from user annotationsConsumes
orProduces
.- Parameters:
mediaTypeValue
- The string media type.
-
EffectiveMediaType
public EffectiveMediaType(javax.ws.rs.core.MediaType mediaType)
Creates new instance withmediaType
which was obtained from user annotationsConsumes
orProduces
.- Parameters:
mediaType
- The media type.
-
-
Method Detail
-
isWildcardType
public boolean isWildcardType()
Returns true if Type ofMediaType
was originally defined as wildcard.- Returns:
- Returns true if method
Consumes
orProduces
was annotated with wildcard type (for example '*/*').
-
isWildcardSubType
public boolean isWildcardSubType()
Returns True if SubType ofMediaType
was originally defined as wildcard.- Returns:
- Returns true if method
Consumes
orProduces
was annotated with wildcard subtype (for example 'text/*').
-
getMediaType
public javax.ws.rs.core.MediaType getMediaType()
ReturnsMediaType
.- Returns:
- Media type.
-
isDerived
boolean isDerived()
Return flag value whether theMediaType
was not defined by annotation and therefore was derived from Message Body Providers.- Returns:
true
if theMediaType
was not defined by annotation and therefore was derived from Message Body Providers,false
otherwise.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-