Class CombinedMediaType.EffectiveMediaType
- java.lang.Object
-
- org.glassfish.jersey.server.internal.routing.CombinedMediaType.EffectiveMediaType
-
- Enclosing class:
- CombinedMediaType
static class CombinedMediaType.EffectiveMediaType extends java.lang.ObjectMedia typeextended by flag indicating whether media type was obtained from user annotationsConsumesorProducesor has no annotation and therefore was derived fromMessageBodyWorkers.
-
-
Constructor Summary
Constructors Constructor Description EffectiveMediaType(java.lang.String mediaTypeValue)Creates new instance withmediaTypewhich was obtained from user annotationsConsumesorProduces.EffectiveMediaType(javax.ws.rs.core.MediaType mediaType)Creates new instance withmediaTypewhich was obtained from user annotationsConsumesorProduces.EffectiveMediaType(javax.ws.rs.core.MediaType mediaType, boolean fromMessageBodyProviders)Creates new instance withmediaTypeand flag indicating the origin of the mediaType.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)javax.ws.rs.core.MediaTypegetMediaType()ReturnsMediaType.inthashCode()(package private) booleanisDerived()Return flag value whether theMediaTypewas not defined by annotation and therefore was derived from Message Body Providers.booleanisWildcardSubType()Returns True if SubType ofMediaTypewas originally defined as wildcard.booleanisWildcardType()Returns true if Type ofMediaTypewas originally defined as wildcard.java.lang.StringtoString()
-
-
-
Constructor Detail
-
EffectiveMediaType
public EffectiveMediaType(javax.ws.rs.core.MediaType mediaType, boolean fromMessageBodyProviders)Creates new instance withmediaTypeand flag indicating the origin of the mediaType.- Parameters:
mediaType- The media type.fromMessageBodyProviders- True ifmediaTypewas derived fromMessageBodyWorkers.
-
EffectiveMediaType
public EffectiveMediaType(java.lang.String mediaTypeValue)
Creates new instance withmediaTypewhich was obtained from user annotationsConsumesorProduces.- Parameters:
mediaTypeValue- The string media type.
-
EffectiveMediaType
public EffectiveMediaType(javax.ws.rs.core.MediaType mediaType)
Creates new instance withmediaTypewhich was obtained from user annotationsConsumesorProduces.- Parameters:
mediaType- The media type.
-
-
Method Detail
-
isWildcardType
public boolean isWildcardType()
Returns true if Type ofMediaTypewas originally defined as wildcard.- Returns:
- Returns true if method
ConsumesorProduceswas annotated with wildcard type (for example '*/*').
-
isWildcardSubType
public boolean isWildcardSubType()
Returns True if SubType ofMediaTypewas originally defined as wildcard.- Returns:
- Returns true if method
ConsumesorProduceswas 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 theMediaTypewas not defined by annotation and therefore was derived from Message Body Providers.- Returns:
trueif theMediaTypewas not defined by annotation and therefore was derived from Message Body Providers,falseotherwise.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-