类 RegexPathElement
java.lang.Object
cn.taketoday.web.util.pattern.PathElement
cn.taketoday.web.util.pattern.RegexPathElement
A regex path element. Used to represent any complicated element of the path.
For example in '/foo/*_*/*_{foobar}' both *_* and *_{foobar}
are
RegexPathElement path elements. Derived from the general
AntPathMatcher approach.- 从以下版本开始:
- 4.0
- 作者:
- Andy Clement
-
字段概要
字段修饰符和类型字段说明private final booleanprivate static final Stringprivate static final Patternprivate final Patternprivate final char[]private int从类继承的字段 cn.taketoday.web.util.pattern.PathElement
CAPTURE_VARIABLE_WEIGHT, next, pos, prev, separator, WILDCARD_WEIGHT -
构造器概要
构造器构造器说明RegexPathElement(int pos, char[] regex, boolean caseSensitive, char[] completePattern, char separator) -
方法概要
修饰符和类型方法说明buildPattern(char[] regex, char[] completePattern) intReturn the number of variables captured by the path element.char[]getChars()intReturn the length of the path element where captures are considered to be one character long.intgetScore()Return the score for this PathElement, combined score is used to compare parsed patterns.intReturn the number of wildcard elements (*, ?)booleanmatches(int pathIndex, PathPattern.MatchingContext matchingContext) Attempt to match this path element.private StringtoString()从类继承的方法 cn.taketoday.web.util.pattern.PathElement
isLiteral, isNoMorePattern
-
字段详细资料
-
GLOB_PATTERN
-
DEFAULT_VARIABLE_PATTERN
- 另请参阅:
-
regex
private final char[] regex -
caseSensitive
private final boolean caseSensitive -
pattern
-
wildcardCount
private int wildcardCount -
variableNames
-
-
构造器详细资料
-
RegexPathElement
RegexPathElement(int pos, char[] regex, boolean caseSensitive, char[] completePattern, char separator)
-
-
方法详细资料
-
buildPattern
-
getVariableNames
-
quote
-
matches
从类复制的说明:PathElementAttempt to match this path element.- 指定者:
matches在类中PathElement- 参数:
pathIndex- the current position within the candidate pathmatchingContext- encapsulates context for the match including the candidate- 返回:
trueif it matches, otherwisefalse
-
getNormalizedLength
public int getNormalizedLength()从类复制的说明:PathElementReturn 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
-
getCaptureCount
public int getCaptureCount()从类复制的说明:PathElementReturn the number of variables captured by the path element.- 覆盖:
getCaptureCount在类中PathElement
-
getWildcardCount
public int getWildcardCount()从类复制的说明:PathElementReturn the number of wildcard elements (*, ?) in the path element.- 覆盖:
getWildcardCount在类中PathElement
-
getScore
public int getScore()从类复制的说明:PathElementReturn the score for this PathElement, combined score is used to compare parsed patterns.- 覆盖:
getScore在类中PathElement
-
toString
-