public class AntPathMatcher extends Object implements PathMatcher
PathMatcher implementation for Ant-style path patterns.| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
AntPathMatcher.AntPathStringMatcher |
protected static class |
AntPathMatcher.AntPatternComparator |
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_PATH_SEPARATOR
Default path separator: "/"
|
| 构造器和说明 |
|---|
AntPathMatcher()
Create a new instance with the
DEFAULT_PATH_SEPARATOR. |
AntPathMatcher(String pathSeparator) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
combine(String pattern1,
String pattern2) |
protected boolean |
doMatch(String pattern,
String path,
boolean fullMatch,
Map<String,String> uriTemplateVariables) |
String |
extractPathWithinPattern(String pattern,
String path) |
Map<String,String> |
extractUriTemplateVariables(String pattern,
String path) |
Comparator<String> |
getPatternComparator(String path) |
protected AntPathMatcher.AntPathStringMatcher |
getStringMatcher(String pattern) |
boolean |
isPattern(String path) |
boolean |
match(String pattern,
String path) |
boolean |
matchStart(String pattern,
String path) |
void |
setCachePatterns(boolean cachePatterns) |
void |
setCaseSensitive(boolean caseSensitive) |
void |
setPathSeparator(String pathSeparator) |
void |
setTrimTokens(boolean trimTokens) |
protected String[] |
tokenizePath(String path) |
protected String[] |
tokenizePattern(String pattern) |
public AntPathMatcher()
DEFAULT_PATH_SEPARATOR.public AntPathMatcher(String pathSeparator)
public void setPathSeparator(String pathSeparator)
public void setCaseSensitive(boolean caseSensitive)
public void setTrimTokens(boolean trimTokens)
public void setCachePatterns(boolean cachePatterns)
public boolean isPattern(String path)
isPattern 在接口中 PathMatcherpublic boolean match(String pattern, String path)
match 在接口中 PathMatcherpublic boolean matchStart(String pattern, String path)
matchStart 在接口中 PathMatcherprotected boolean doMatch(String pattern, String path, boolean fullMatch, Map<String,String> uriTemplateVariables)
protected AntPathMatcher.AntPathStringMatcher getStringMatcher(String pattern)
public String extractPathWithinPattern(String pattern, String path)
extractPathWithinPattern 在接口中 PathMatcherpublic Map<String,String> extractUriTemplateVariables(String pattern, String path)
extractUriTemplateVariables 在接口中 PathMatcherpublic String combine(String pattern1, String pattern2)
combine 在接口中 PathMatcherpublic Comparator<String> getPatternComparator(String path)
getPatternComparator 在接口中 PathMatcherCopyright © 2018. All rights reserved.