类 UrlRegexRequestMatcher

java.lang.Object
cn.taketoday.test.web.servlet.htmlunit.UrlRegexRequestMatcher
所有已实现的接口:
WebRequestMatcher

public final class UrlRegexRequestMatcher extends Object implements WebRequestMatcher
A WebRequestMatcher that allows matching on WebRequest#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.0
作者:
Rob Winch, Sam Brannen
另请参阅:
  • 字段详细资料

    • pattern

      private final Pattern pattern
  • 构造器详细资料

    • UrlRegexRequestMatcher

      public UrlRegexRequestMatcher(String regex)
    • UrlRegexRequestMatcher

      public UrlRegexRequestMatcher(Pattern pattern)
  • 方法详细资料

    • matches

      public boolean matches(org.htmlunit.WebRequest request)
      从接口复制的说明: WebRequestMatcher
      Whether this matcher matches on the supplied web request.
      指定者:
      matches 在接口中 WebRequestMatcher
      参数:
      request - the WebRequest to attempt to match on
      返回:
      true if this matcher matches on the WebRequest