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 Details

    • expression

      protected final String expression
    • caseSensitiveName

      protected final boolean caseSensitiveName
    • name

      protected final String name
    • value

      @Nullable protected final T value
    • isNegated

      protected final boolean isNegated
  • Constructor Details

    • AbstractNameValueExpression

      protected AbstractNameValueExpression(@Nonnull String expression)
    • AbstractNameValueExpression

      protected AbstractNameValueExpression(@Nonnull String expression, boolean caseSensitiveName)
  • Method Details

    • getExpression

      protected final String 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

      public String getName()
      Specified by:
      getName in interface NameValueExpression<T>
    • getValue

      @Nullable public T getValue()
      Specified by:
      getValue in interface NameValueExpression<T>
    • isNegated

      public boolean isNegated()
      Specified by:
      isNegated in interface NameValueExpression<T>
    • match

      public final boolean match(org.springframework.web.context.request.NativeWebRequest request)
    • parseValue

      protected abstract T parseValue(String valueExpression)
    • 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

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object