Package io.microsphere.spring.web.rule
Class AbstractNameValueExpression<T>
java.lang.Object
io.microsphere.spring.web.rule.AbstractNameValueExpression<T>
- Type Parameters:
T- the value type
- All Implemented Interfaces:
NameValueExpression<T>
- Direct Known Subclasses:
WebRequestHeaderExpression,WebRequestParamExpression
public abstract class AbstractNameValueExpression<T>
extends Object
implements NameValueExpression<T>
Supports "name=value" style expressions as described in:
RequestMapping.params() and
RequestMapping.headers().- Since:
- Spring Framework 3.1
- Author:
- Rossen Stoyanchev, Arjen Poutsma, Mercy
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractNameValueExpression(String expression) protectedAbstractNameValueExpression(String expression, boolean caseSensitiveName) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected final StringGet the expressiongetName()getValue()inthashCode()protected final booleanGet the case-sensitivity of the namebooleanfinal booleanmatch(org.springframework.web.context.request.NativeWebRequest request) protected abstract booleanmatchName(org.springframework.web.context.request.NativeWebRequest request) protected abstract booleanmatchValue(org.springframework.web.context.request.NativeWebRequest request) protected abstract TparseValue(String valueExpression) toString()
-
Field Details
-
expression
-
caseSensitiveName
protected final boolean caseSensitiveName -
name
-
value
-
isNegated
protected final boolean isNegated
-
-
Constructor Details
-
AbstractNameValueExpression
-
AbstractNameValueExpression
-
-
Method Details
-
getExpression
Get the expression- Returns:
- non-null
-
isCaseSensitiveName
protected final boolean isCaseSensitiveName()Get the case-sensitivity of the name- Returns:
- true if case-sensitive, false otherwise
-
getName
- Specified by:
getNamein interfaceNameValueExpression<T>
-
getValue
- Specified by:
getValuein interfaceNameValueExpression<T>
-
isNegated
public boolean isNegated()- Specified by:
isNegatedin interfaceNameValueExpression<T>
-
match
public final boolean match(org.springframework.web.context.request.NativeWebRequest request) -
parseValue
-
matchName
protected abstract boolean matchName(org.springframework.web.context.request.NativeWebRequest request) -
matchValue
protected abstract boolean matchValue(org.springframework.web.context.request.NativeWebRequest request) -
equals
-
hashCode
public int hashCode() -
toString
-