类 CaptureTheRestPathElement

java.lang.Object
cn.taketoday.web.util.pattern.PathElement
cn.taketoday.web.util.pattern.CaptureTheRestPathElement
所有已实现的接口:
VariableNameProvider

class CaptureTheRestPathElement extends PathElement implements VariableNameProvider
A path element representing capturing the rest of a path. In the pattern '/foo/{*foobar}' the /{*foobar} is represented as a CaptureTheRestPathElement.
从以下版本开始:
4.0
作者:
Andy Clement
  • 字段详细资料

    • variableName

      private final String variableName
  • 构造器详细资料

    • CaptureTheRestPathElement

      CaptureTheRestPathElement(int pos, char[] captureDescriptor, char separator)
      Create a new CaptureTheRestPathElement instance.
      参数:
      pos - position of the path element within the path pattern text
      captureDescriptor - a character array containing contents like '{' '*' 'a' 'b' '}'
      separator - the separator used in the path pattern
  • 方法详细资料

    • matches

      public boolean matches(int pathIndex, PathPattern.MatchingContext matchingContext)
      从类复制的说明: PathElement
      Attempt to match this path element.
      指定者:
      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
    • pathToString

      private String pathToString(int fromSegment, List<PathContainer.Element> pathElements)
    • getVariableName

      public String getVariableName()
      指定者:
      getVariableName 在接口中 VariableNameProvider
    • 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
    • getCaptureCount

      public int getCaptureCount()
      从类复制的说明: PathElement
      Return the number of variables captured by the path element.
      覆盖:
      getCaptureCount 在类中 PathElement
    • toString

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