类 WildcardPathElement

java.lang.Object
cn.taketoday.web.util.pattern.PathElement
cn.taketoday.web.util.pattern.WildcardPathElement

class WildcardPathElement extends PathElement
A wildcard path element. In the pattern '/foo/*/goo' the * is represented by a WildcardPathElement. Within a path it matches at least one character but at the end of a path it can match zero characters.
从以下版本开始:
4.0
作者:
Andy Clement
  • 构造器详细资料

    • WildcardPathElement

      public WildcardPathElement(int pos, char separator)
  • 方法详细资料

    • matches

      public boolean matches(int pathIndex, PathPattern.MatchingContext matchingContext)
      Matching on a WildcardPathElement is quite straight forward. Scan the candidate from the candidateIndex onwards for the next separator or the end of the candidate.
      指定者:
      matches 在类中 PathElement
      参数:
      pathIndex - the current position within the candidate path
      matchingContext - encapsulates context for the match including the candidate
      返回:
      true if it matches, otherwise false
    • getNormalizedLength

      public int getNormalizedLength()
      从类复制的说明: PathElement
      Return the length of the path element where captures are considered to be one character long.
      指定者:
      getNormalizedLength 在类中 PathElement
      返回:
      the normalized length
    • getChars

      public char[] getChars()
      指定者:
      getChars 在类中 PathElement
    • getWildcardCount

      public int getWildcardCount()
      从类复制的说明: PathElement
      Return the number of wildcard elements (*, ?) in the path element.
      覆盖:
      getWildcardCount 在类中 PathElement
    • getScore

      public int getScore()
      从类复制的说明: PathElement
      Return the score for this PathElement, combined score is used to compare parsed patterns.
      覆盖:
      getScore 在类中 PathElement
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object