|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcn.dreampie.common.util.matcher.AntPathMatcher
public class AntPathMatcher
Created by ice on 14-9-10.
| 字段摘要 | |
|---|---|
static String |
DEFAULT_PATH_SEPARATOR
Default path separator: "/" |
| 构造方法摘要 | |
|---|---|
AntPathMatcher()
|
|
| 方法摘要 | |
|---|---|
protected boolean |
doMatch(String pattern,
String path,
boolean fullMatch)
Actually match the given path against the given pattern. |
String |
extractPathWithinPattern(String pattern,
String path)
Given a pattern and a full path, determine the pattern-mapped part. |
static AntPathMatcher |
instance()
|
boolean |
isPattern(String path)
|
static void |
main(String[] args)
|
boolean |
match(String pattern,
String path)
|
boolean |
matches(String pattern,
String source)
Returns true if the given source matches the specified pattern,
false otherwise. |
boolean |
matchStart(String pattern,
String path)
|
void |
setPathSeparator(String pathSeparator)
Set the path separator to use for pattern parsing. |
static String[] |
tokenizeToStringArray(String str,
String delimiters)
|
static String[] |
tokenizeToStringArray(String str,
String delimiters,
boolean trimTokens,
boolean ignoreEmptyTokens)
|
static String[] |
toStringArray(Collection collection)
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static final String DEFAULT_PATH_SEPARATOR
| 构造方法详细信息 |
|---|
public AntPathMatcher()
| 方法详细信息 |
|---|
public static AntPathMatcher instance()
public static String[] tokenizeToStringArray(String str,
String delimiters)
public static String[] tokenizeToStringArray(String str,
String delimiters,
boolean trimTokens,
boolean ignoreEmptyTokens)
public static String[] toStringArray(Collection collection)
public static void main(String[] args)
public void setPathSeparator(String pathSeparator)
pathSeparator - pathSeppublic boolean isPattern(String path)
public boolean matches(String pattern,
String source)
Matcher 复制的描述true if the given source matches the specified pattern,
false otherwise.
Matcher 中的 matchespattern - the pattern to match againstsource - the source to match
true if the given source matches the specified pattern,
false otherwise.
public boolean match(String pattern,
String path)
public boolean matchStart(String pattern,
String path)
protected boolean doMatch(String pattern,
String path,
boolean fullMatch)
path against the given pattern.
pattern - the pattern to match againstpath - the path String to testfullMatch - whether a full pattern match is required
(else a pattern match as far as the given base path goes is sufficient)
true if the supplied path matched,
false if it didn't
public String extractPathWithinPattern(String pattern,
String path)
For example:
/docs/cvs/commit.html and /docs/cvs/commit.html /docs/* and /docs/cvs/commit cvs/commit/docs/cvs/*.html and /docs/cvs/commit.html commit.html/docs/** and /docs/cvs/commit cvs/commit/docs/**\/*.html and /docs/cvs/commit.html cvs/commit.html/*.html and /docs/cvs/commit.html docs/cvs/commit.html*.html and /docs/cvs/commit.html /docs/cvs/commit.html* and /docs/cvs/commit.html /docs/cvs/commit.htmlAssumes that match(java.lang.String, java.lang.String) returns true for pattern
and path, but does not enforce this.
path - the path String to testpattern - pattern to match against. Must not be null.
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||