Class CombinedMediaType.EffectiveMediaType
java.lang.Object
org.glassfish.jersey.server.internal.routing.CombinedMediaType.EffectiveMediaType
- Enclosing class:
CombinedMediaType
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 -
Constructor Summary
ConstructorsConstructorDescriptionEffectiveMediaType
(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
Modifier and TypeMethodDescriptionboolean
javax.ws.rs.core.MediaType
ReturnsMediaType
.int
hashCode()
(package private) boolean
Return flag value whether theMediaType
was not defined by annotation and therefore was derived from Message Body Providers.boolean
Returns True if SubType ofMediaType
was originally defined as wildcard.boolean
Returns true if Type ofMediaType
was originally defined as wildcard.toString()
-
Field Details
-
derived
private final boolean derivedTrue 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 withmediaType
and flag indicating the origin of the mediaType.- Parameters:
mediaType
- The media type.fromMessageBodyProviders
- True ifmediaType
was derived fromMessageBodyWorkers
.
-
EffectiveMediaType
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 Details
-
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
-
equals
-
hashCode
public int hashCode()
-