Examples of matches()


Examples of org.springframework.web.servlet.handler.MappedInterceptor.matches()

    PathMatcher pathMatcher = new AntPathMatcher();
    List<HandlerInterceptor> result = new ArrayList<HandlerInterceptor>();
    for (Object interceptor : this.registry.getInterceptors()) {
      if (interceptor instanceof MappedInterceptor) {
        MappedInterceptor mappedInterceptor = (MappedInterceptor) interceptor;
        if (mappedInterceptor.matches(lookupPath, pathMatcher)) {
          result.add(mappedInterceptor.getInterceptor());
        }
      }
      else if (interceptor instanceof HandlerInterceptor) {
        result.add((HandlerInterceptor) interceptor);

Examples of org.springframework.web.util.UriTemplate.matches()

    public void doWith(ResourceTester content) {

      String href = content.assertHasLink("self", null).getHref();

      UriTemplate uriTemplate = new UriTemplate(template.toString());
      assertThat(String.format("Expected %s to match %s!", href, uriTemplate.toString()), uriTemplate.matches(href),
          is(true));
    }
  }
}

Examples of org.springsource.loaded.AnyTypePattern.matches()

  }

  @Test
  public void any() {
    AnyTypePattern tp = new AnyTypePattern();
    assertTrue(tp.matches("com.foo.Bar"));
    assertTrue(tp.matches("com.food.Bar"));
  }

}

Examples of org.springsource.loaded.ExactTypePattern.matches()

  }

  @Test
  public void exact() {
    ExactTypePattern tp = new ExactTypePattern("com.foo.Bark");
    assertTrue(tp.matches("com.foo.Bark"));
    assertFalse(tp.matches("com.food.Bar"));
  }

  @Test
  public void any() {

Examples of org.springsource.loaded.PrefixTypePattern.matches()

  @Test
  public void prefix() {
    PrefixTypePattern tp = new PrefixTypePattern("com.foo..*");
    assertEquals("text:com.foo..*", tp.toString());
    assertTrue(tp.matches("com.foo.Bar"));
    assertFalse(tp.matches("com.food.Bar"));
  }

  @Test
  public void exact() {

Examples of org.worldbank.transport.tamt.client.util.Pattern.matches()

    /*
     * Must be in the format HHmm (that is, 4 consecutive digits)
     */
    Pattern pattern = new Pattern("\\d\\d\\d\\d");
    Date date = null;
    if( pattern.matches(hhmm))
    {
      GWT.log("pattern matches?: " + pattern.matches(hhmm));
     
      GWT.log("hhmm:" + hhmm);
      String hh = hhmm.substring(0, 2);

Examples of org.wso2.uri.template.URITemplate.matches()

        URIMatcherHostObject uriho = (URIMatcherHostObject) thisObj;
        Map<String, String> urlParts = new HashMap<String, String>();

        try {
            URITemplate uriTemplate = new URITemplate(template);
            boolean uriMatch = uriTemplate.matches(uriho.uriToBeMatched, urlParts);
            if (!uriMatch) {
                return null;
            }
        } catch (URITemplateException e) {
            throw new ScriptException(e);

Examples of org.xhtmlrenderer.css.sheet.MediaRule.matches()

                } else if (obj instanceof PageRule) {
                    ((PageRule)obj).setPos(++pCount);
                    _pageRules.add(obj);
                } else if (obj instanceof MediaRule) {
                    MediaRule mediaRule = (MediaRule)obj;
                    if (mediaRule.matches(medium)) {
                        for (Iterator k = mediaRule.getContents().iterator(); k.hasNext(); ) {
                            Ruleset ruleset = (Ruleset)k.next();
                            for (Iterator l = ruleset.getFSSelectors().iterator(); l.hasNext(); ) {
                                Selector selector = (Selector)l.next();
                                selector.setPos(++count);

Examples of org.yaml.snakeyaml.nodes.Tag.matches()

        }
    }

    private void resetTag(Class<? extends Object> type, Node node) {
        Tag tag = node.getTag();
        if (tag.matches(type)) {
            if (Enum.class.isAssignableFrom(type)) {
                node.setTag(Tag.STR);
            } else {
                node.setTag(Tag.MAP);
            }

Examples of proguard.util.StringMatcher.matches()

            int memberNameIndex = noteSequenceMatcher.matchedConstantIndex(MEMBER_NAME_INDEX);
            String memberName = memberNameIndex <= 0 ? defaultName :
                clazz.getStringString(memberNameIndex);

            if (noteExceptionMatcher == null ||
                !noteExceptionMatcher.matches(memberName))
            {
                // Compose the external member name and partial descriptor.
                String externalMemberDescription = memberName;

                if (!isField)
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.