org.springframework.web.servlet.mvc.condition
Class AbstractMediaTypeExpression
java.lang.Object
org.springframework.web.servlet.mvc.condition.AbstractMediaTypeExpression
- All Implemented Interfaces:
- java.lang.Comparable<AbstractMediaTypeExpression>, MediaTypeExpression
- Direct Known Subclasses:
- ConsumesRequestCondition.ConsumeMediaTypeExpression, ProducesRequestCondition.ProduceMediaTypeExpression
abstract class AbstractMediaTypeExpression
- extends java.lang.Object
- implements java.lang.Comparable<AbstractMediaTypeExpression>, MediaTypeExpression
Supports media type expressions as described in:
RequestMapping.consumes()
and RequestMapping.produces()
.
- Since:
- 3.1
- Author:
- Arjen Poutsma, Rossen Stoyanchev
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
mediaType
private final MediaType mediaType
isNegated
private final boolean isNegated
AbstractMediaTypeExpression
AbstractMediaTypeExpression(java.lang.String expression)
AbstractMediaTypeExpression
AbstractMediaTypeExpression(MediaType mediaType,
boolean negated)
getMediaType
public MediaType getMediaType()
- Specified by:
getMediaType
in interface MediaTypeExpression
isNegated
public boolean isNegated()
- Specified by:
isNegated
in interface MediaTypeExpression
match
public final boolean match(HttpServletRequest request)
matchMediaType
protected abstract boolean matchMediaType(HttpServletRequest request)
compareTo
public int compareTo(AbstractMediaTypeExpression other)
- Specified by:
compareTo
in interface java.lang.Comparable<AbstractMediaTypeExpression>
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object