Examples of Matcher

  • net.fortytwo.twitlogic.syntax.Matcher
    two.net).
  • net.xeoh.plugins.diagnosis.local.util.conditions.matcher.Matcher
    @author Ralf Biedert
  • org.apache.cocoon.matching.Matcher
    @author Giacomo Pati @version CVS $Revision: 1.2.2.5 $ $Date: 2001/11/06 09:55:36 $
  • org.apache.fop.fonts.FontTriplet.Matcher
  • org.apache.ivy.plugins.matcher.Matcher
    An interface that defines a string matcher.
  • org.apache.mailet.Matcher
    This interface define the behaviour of the message "routing" inside the mailet container. The match(Mail) method returns a Collection of recipients that meet this class's criteria.

    An important feature of the mailet container is the ability to fork processing of messages. When a message first arrives at the server, it might have multiple recipients specified. As a message is passed to a matcher, the matcher might only "match" one of the listed recipients. It would then return only the matching recipient in the Collection. The mailet container should then duplicate the message splitting the recipient list across the two messages as per what the matcher returned.

    [THIS PARAGRAPH NOT YET IMPLEMENTED] The matcher can extend this forking to further separation by returning a Collection of Collection objects. This allows a matcher to fork multiple processes if there are multiple recipients that require separate processing. For example, we could write a ListservMatcher that handles multiple listservs. When someone cross-posts across multiple listservs that this matcher handles, it could put each listserv address (recipient) that it handles in a separate Collection object. By returning each of these Collections within a container Collection object, it could indicate to the mailet container how many forks to spawn.

    This interface defines methods to initialize a matcher, to match messages, and to remove a matcher from the server. These are known as life-cycle methods and are called in the following sequence:

    1. The matcher is constructed, then initialized with the init method.
    2. Any calls from clients to the match method are handled.
    3. The matcher is taken out of service, then destroyed with the destroy method, then garbage collected and finalized.
    In addition to the life-cycle methods, this interface provides the getMatcherConfig method, which the matcher can use to get any startup information, and the getMatcherInfo method, which allows the matcher to return basic information about itself, such as author, version, and copyright. @version 1.0.0, 24/04/1999 @author Federico Barbieri @author Serge Knystautas
  • org.apache.tika.sax.xpath.Matcher
    XPath element matcher. A matcher instance encapsulates a specific state in XPath evaluation.
  • org.gocha.text.regex.Matcher
    Результат совпадения шаблона @author gocha
  • org.gwt.mosaic.core.client.util.regex.Matcher
    @author georgopoulos.georgios(at)gmail.com
  • org.hamcrest.Matcher
    A matcher over acceptable values. A matcher is able to describe itself to give feedback when it fails.

    Matcher implementations should NOT directly implement this interface. Instead, extend the {@link BaseMatcher} abstract class,which will ensure that the Matcher API can grow to support new features and remain compatible with all Matcher implementations.

    For easy access to common Matcher implementations, use the static factory methods in {@link CoreMatchers}. @see CoreMatchers @see BaseMatcher

  • org.infinispan.objectfilter.Matcher
    @author anistor@redhat.com @since 7.0
  • org.jbehave.core.mock.Matcher
    Represents a matcher on a method argument. @author Dan North
  • org.jbpm.pvm.internal.type.Matcher
  • org.jbpm.pvm.type.Matcher
  • org.joni.Matcher
  • org.jregex.Matcher
    Matcher instance is an automaton that actually performs matching. It provides the following methods:
  • searching for a matching substrings : matcher.find() or matcher.findAll();
  • testing whether a text matches a whole pattern : matcher.matches();
  • testing whether the text matches the beginning of a pattern : matcher.matchesPrefix();
  • searching with custom options : matcher.find(int options)

    Obtaining results
    After the search succeded, i.e. if one of above methods returned true one may obtain an information on the match:

  • may check whether some group is captured : matcher.isCaptured(int);
  • may obtain start and end positions of the match and its length : matcher.start(int),matcher.end(int),matcher.length(int);
  • may obtain match contents as String : matcher.group(int).
    The same way can be obtained the match prefix and suffix information. The appropriate methods are grouped in MatchResult interface, which the Matcher class implements.
    Matcher objects are not thread-safe, so only one thread may use a matcher instance at a time. Note, that Pattern objects are thread-safe(the same instanse may be shared between multiple threads), and the typical tactics in multithreaded applications is to have one Pattern instance per expression(a singleton), and one Matcher object per thread.
  • org.kitesdk.morphline.shaded.com.google.code.regexp.Matcher
    An engine that performs match operations on a character sequence by interpreting a {@link Pattern}. This is a wrapper for {@link java.util.regex.Matcher}. @since 0.1.9
  • org.modeshape.jcr.sequencer.SequencerPathExpression.Matcher
  • org.netbeans.server.componentsmatch.Matcher
    @author Jindrich Sedek
  • org.openstreetmap.osmosis.tagtransform.Matcher
  • org.parboiled.matchers.Matcher
    A Matcher instance is responsible for "executing" a specific Rule instance, i.e. it implements the actual rule type specific matching logic. Since it extends the {@link GraphNode} interface it can have submatchers.
  • org.shiftone.jrat.util.regex.Matcher
    @author $Author: jeffdrost $ @version $Revision: 1.4 $

  • Examples of abbot.finder.Matcher

       * Returns the component of a given class in <code>container</code> hierarchy.
       */
      public static Component findComponent(Container container,
                                            final Class componentClass)
          throws ComponentSearchException {
        return new BasicFinder().find(container, new Matcher () {
            public boolean matches(Component component) {
              return componentClass.isInstance(component);
            }
          });
      }
    View Full Code Here

    Examples of algorithms.Matcher

        private static final String textFileName = "textSample.txt";
        private static final String patternFileName = "patternSample.txt";

        public static void main(String[] args) throws IOException {
            Matcher matcher;

            String pattern = getText(patternFileName);
            String textSample = getText(textFileName);

            matcher = new Naive(pattern);
    View Full Code Here

    Examples of ch.qos.logback.core.boolex.Matcher

      protected String[] getParameterNames() {
        List<String> fullNameList = new ArrayList<String>();
        fullNameList.addAll(DEFAULT_PARAM_NAME_LIST);

        for(int i = 0; i < matcherList.size(); i++) {
          Matcher m = (Matcher) matcherList.get(i);
          fullNameList.add(m.getName());
        }
       
        return (String[]) fullNameList.toArray(CoreGlobal.EMPTY_STRING_ARRAY);
      }
    View Full Code Here

    Examples of com.cloudera.cdk.morphline.shaded.com.google.code.regexp.Matcher

     
      @Test
      public void testGrokSeparatedValues() throws Exception {
        String msg = "hello\tworld\tfoo";
        Pattern pattern = Pattern.compile("(?<word>.+?)(\\t|\\z)");
        Matcher matcher = pattern.matcher(msg);
        List<String> results = new ArrayList();
        while (matcher.find()) {
          //System.out.println("match:'" + matcher.group(1) + "'");
          results.add(matcher.group(1));
        }
        assertEquals(Arrays.asList("hello", "world", "foo"), results);
      }
    View Full Code Here

    Examples of com.foundationdb.server.types.texpressions.Matcher

            // Pattern (and any optional escape) are constant: can precompile the matcher.
            LikeType likeType = (LikeType)context.get(TYPE_INDEX);
            if (likeType == null)
                likeType = this.likeType;
           
            Matcher matcher = Matchers.getMatcher(pattern, esca, likeType == LikeType.ILIKE);
            context.set(MATCHER_INDEX, matcher);

            return result;
        }
    View Full Code Here

    Examples of com.google.code.regexp.Matcher

        private static final String VALUE_FIELD_REGEX = "private static final %s\\[\\] [$\\w\\d]+ = new %s\\[\\]\\{.*?\\};";

        public static String processFile(String fileName, String text) throws IOException
        {
            StringBuffer out = new StringBuffer();
            Matcher m = SYNTHETICS.matcher(text);
            while(m.find())
            {
                m.appendReplacement(out, synthetic_replacement(m).replace("$", "\\$"));
            }
            m.appendTail(out);
            text = out.toString();

            text = text.replaceAll(TRAILING, "");
           
            text = text.replaceAll(TRAILINGZERO, "$1$2");
    View Full Code Here

    Examples of com.volantis.styling.impl.engine.matchers.Matcher

            // =====================================================================
            //   Test Expectations
            // =====================================================================

            Matcher matcher = new AttributeMatcher(null, "local", constraintMock);
            MatcherResult actual = matcher.matches(matcherContextMock);
            assertEquals("Wrong result", MatcherResult.MATCHED, actual);
        }
    View Full Code Here

    Examples of de.odysseus.calyxo.forms.Matcher

       */
      Validator getValidator(MatchConfig config, Locale locale) {
        String key = getKey(config, locale);
        Validator validator = (Validator)validators.get(key);
        if (validator == null) {
          Matcher matcher = (Matcher)create(config);
          matcher.localize(locale);
          validator = new Validator.Match(config, matcher);
          if (matcher.isSharable()) {
            validators.put(key, validator);
          }
        }
        return validator;
      }
    View Full Code Here

    Examples of edu.umd.cs.findbugs.filter.Matcher

            for (Map.Entry<JCheckBox, Sortables> e : map.entrySet()) {
                if (e.getKey().isSelected()) {
                    set.add(e.getValue());
                }
            }
            Matcher matcher = null;
            if (!set.isEmpty()) {
                matcher = FilterFactory.makeMatcher(set, bug);

                if(notFilterCheck.isSelected()) {
                    matcher = FilterFactory.invertMatcher(matcher);
    View Full Code Here

    Examples of ext.jtester.hamcrest.Matcher

        return (IStringAssert) this.assertThat(matcher);
      }

      public IStringAssert notContain(String sub, StringMode... modes) {
        StringContainMatcher matcher = new StringContainMatcher(new String[] { sub }, modes);
        Matcher _matcher = IsNot.not(matcher);
        return this.assertThat(_matcher);
      }
    View Full Code Here
    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.