static class CombinedMediaType.EffectiveMediaType
extends java.lang.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
.Modifier and Type | Field and Description |
---|---|
private boolean |
derived
True if the MediaType was not defined by annotation and therefore was
derived from Message Body Providers.
|
private javax.ws.rs.core.MediaType |
mediaType |
Constructor and Description |
---|
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. |
EffectiveMediaType(java.lang.String mediaTypeValue)
Creates new instance with
mediaType which was obtained from user
annotations Consumes or Produces . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
javax.ws.rs.core.MediaType |
getMediaType()
Returns
MediaType . |
int |
hashCode() |
(package private) boolean |
isDerived()
Return flag value whether the
MediaType was not defined by annotation and therefore was derived from
Message Body Providers. |
boolean |
isWildcardSubType()
Returns True if SubType of
MediaType was originally defined as wildcard. |
boolean |
isWildcardType()
Returns true if Type of
MediaType was originally defined as wildcard. |
java.lang.String |
toString() |
private final boolean derived
private final javax.ws.rs.core.MediaType mediaType
public EffectiveMediaType(javax.ws.rs.core.MediaType mediaType, boolean fromMessageBodyProviders)
mediaType
and flag indicating the origin of
the mediaType.mediaType
- The media type.fromMessageBodyProviders
- True if mediaType
was derived from
MessageBodyWorkers
.public EffectiveMediaType(java.lang.String mediaTypeValue)
mediaType
which was obtained from user
annotations Consumes
or Produces
.mediaTypeValue
- The string media type.public EffectiveMediaType(javax.ws.rs.core.MediaType mediaType)
mediaType
which was obtained from user
annotations Consumes
or Produces
.mediaType
- The media type.public boolean isWildcardType()
MediaType
was originally defined as wildcard.Consumes
or Produces
was
annotated with wildcard type (for example '*/*').public boolean isWildcardSubType()
MediaType
was originally defined as wildcard.Consumes
or Produces
was
annotated with wildcard subtype (for example 'text/*').public javax.ws.rs.core.MediaType getMediaType()
MediaType
.boolean isDerived()
MediaType
was not defined by annotation and therefore was derived from
Message Body Providers.true
if the MediaType
was not defined by annotation and therefore was derived from
Message Body Providers, false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object