类 UrlRegexRequestMatcher
- java.lang.Object
- org.springframework.test.web.servlet.htmlunit.UrlRegexRequestMatcher
- 所有已实现的接口:
WebRequestMatcher
public final class UrlRegexRequestMatcher extends Object implements WebRequestMatcher
AWebRequestMatcherthat allows matching onWebRequest#getUrl().toExternalForm()using a regular expression.For example, if you would like to match on the domain
code.jquery.com, you might want to use the following.WebRequestMatcher cdnMatcher = new UrlRegexRequestMatcher(".*?//code.jquery.com/.*");- 从以下版本开始:
- 4.2
- 作者:
- Rob Winch, Sam Brannen
- 另请参阅:
DelegatingWebConnection
构造器概要
构造器 构造器 说明 UrlRegexRequestMatcher(String regex)UrlRegexRequestMatcher(Pattern pattern)
构造器详细资料
UrlRegexRequestMatcher
public UrlRegexRequestMatcher(String regex)
UrlRegexRequestMatcher
public UrlRegexRequestMatcher(Pattern pattern)
方法详细资料
matches
public boolean matches(com.gargoylesoftware.htmlunit.WebRequest request)
从接口复制的说明:WebRequestMatcherWhether this matcher matches on the supplied web request.- 指定者:
matches在接口中WebRequestMatcher- 参数:
request- theWebRequestto attempt to match on- 返回:
trueif this matcher matches on theWebRequest