Examples of matches()


Examples of org.apache.tools.ant.util.regexp.Regexp.matches()

                               String input,
                               int options) {
        String res = input;
        Regexp regexp = r.getRegexp(getProject());

        if (regexp.matches(input, options)) {
            log("Found match; substituting", Project.MSG_DEBUG);
            res = regexp.substitute(input, s.getExpression(getProject()),
                                    options);
        }

Examples of org.apache.tools.ant.util.regexp.RegexpMatcher.matches()

                RegexpMatcherFactory matchMaker = new RegexpMatcherFactory();
                RegexpMatcher matcher = matchMaker.newRegexpMatcher();
                matcher.setPattern(r.regex);
                for (Enumeration p = properties.keys(); p.hasMoreElements();) {
                    String name = (String) p.nextElement();
                    if (matcher.matches(name)) {
                        names.add(name);
                    }
                }
            } else if (r.builtin != null) {

Examples of org.apache.tuscany.sca.assembly.Endpoint.matches()

    public List<Endpoint> findEndpoint(String uri) {
        List<Endpoint> foundEndpoints = new ArrayList<Endpoint>();
        for (Object v : endpointMap.values()) {
            Endpoint endpoint = (Endpoint)v;
            logger.fine("Matching against - " + endpoint);
            if (endpoint.matches(uri)) {
                endpoint = localizeEndpoint(endpoint);
                foundEndpoints.add(endpoint);
                logger.fine("Found endpoint with matching service  - " + endpoint);
            }
        }

Examples of org.apache.wicket.request.target.coding.IRequestTargetUrlCodingStrategy.matches()

      {
        final String key = entry.getKey();
        if (path.startsWith(key))
        {
          IRequestTargetUrlCodingStrategy strategy = entry.getValue();
          if (strategy.matches(path, caseSensitiveMounts))
          {
            return strategy;
          }
        }
      }

Examples of org.apache.wicket.util.parse.metapattern.parsers.CommaSeparatedVariableParser.matches()

   * Test parsing of comma separated variables.
   */
  public void testCommaSeparatedVariableParser()
  {
    CommaSeparatedVariableParser parser = new CommaSeparatedVariableParser("a,b,c");
    assertTrue(parser.matches());
    assertEquals(3, parser.getValues().size());
    assertEquals("a", parser.getValues().get(0));
    assertEquals("b", parser.getValues().get(1));
    assertEquals("c", parser.getValues().get(2));

Examples of org.apache.wicket.util.parse.metapattern.parsers.IntegerVariableAssignmentParser.matches()

   * Test assignment of integers.
   */
  public void testIntegerVariableAssignmentParser()
  {
    IntegerVariableAssignmentParser parser = new IntegerVariableAssignmentParser("foo = 9");
    assertTrue(parser.matches());
    assertEquals("foo", parser.getVariable());
    assertEquals(9, parser.getIntValue());
    assertEquals(9, parser.getLongValue());

    parser = new IntegerVariableAssignmentParser("foo=9");

Examples of org.apache.wicket.util.parse.metapattern.parsers.VariableAssignmentParser.matches()

      // Parse using metapattern parser for variable assignments
      final VariableAssignmentParser parser = new VariableAssignmentParser(pair, valuePattern);

      // Does it parse?
      if (parser.matches())
      {
        // Succeeded. Put key and value into map
        put(parser.getKey(), parser.getValue());
      }
      else

Examples of org.apache.wink.common.internal.uritemplate.UriTemplateMatcher.matches()

        readersLock.lock();
        try {
            // the list of root resource records is already sorted
            for (ResourceRecord record : rootResources) {
                UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
                if (matcher.matches(uri)) {
                    if (matcher.isExactMatch() || record.hasSubResources()) {
                        found.add(new ResourceInstance(record, matcher));
                    }
                }
            }

Examples of org.apache.xerces.impl.validation.datatypes.regex.RegularExpression.matches()

         Match m = new Match();
         RegularExpression re = (RegularExpression) ht.get(ithSubMatchName + "RE");
         if (re == null) {
            continue;
         }
         if (!re.matches(str, m)) {
            continue;
         }
         stack.insertElementAt(new NamedMatch(ithSubMatchName, m), 0);
         String result = getComponent(request);
         if (result != null) {

Examples of org.apache.xerces.impl.xpath.regex.RegularExpression.matches()

        if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
            RegularExpression regex;
            for (int idx = fPattern.size()-1; idx >= 0; idx--) {
                regex = (RegularExpression)fPattern.elementAt(idx);
                if (!regex.matches(nvalue)){
                    throw new InvalidDatatypeValueException("cvc-pattern-valid",
                                                            new Object[]{content, regex});
                }
            }
        }
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.