Examples of matches()


Examples of org.apache.activemq.filter.BooleanExpression.matches()

                if (selectorExpression == null) {
                    c.add(OpenTypeSupport.convert(messages[i]));
                } else {
                    ctx.setMessageReference(messages[i]);
                    if (selectorExpression.matches(ctx)) {
                        c.add(OpenTypeSupport.convert(messages[i]));
                    }
                }

            } catch (Throwable e) {

Examples of org.apache.activemq.filter.DestinationFilter.matches()

        DestinationFilter filter = DestinationFilter.parseFilter(destination);
        ActiveMQDestination[] dests = excludedDestinations;
        if (dests != null && dests.length > 0) {
            for (int i = 0; i < dests.length; i++) {
                ActiveMQDestination match = dests[i];
                if (match != null && filter.matches(match)) {
                    return false;
                }
            }
        }
        dests = dynamicallyIncludedDestinations;

Examples of org.apache.aries.application.VersionRange.matches()

     
      if ((appContentRange == null) && (useBundleRange == null)){
        _provisionSharedContent.add(dp);
      } else if (appContentRange.matches(info.getVersion())) {
        _deploymentContent.add(dp);
      else if (useBundleRange.matches(info.getVersion())) {
        _deployedUseBundleContent.add(dp);
      }
      else {
        throw new ResolverException("Bundle " + info.getSymbolicName() + " at version " + info.getVersion() + " is not in the range " + appContentRange + " or " + useBundleRange);
      }

Examples of org.apache.aries.util.VersionRange.matches()

     
      if ((appContentRange == null) && (useBundleRange == null)){
        _provisionSharedContent.add(dp);
      } else if (appContentRange.matches(info.getVersion())) {
        _deploymentContent.add(dp);
      else if (useBundleRange.matches(info.getVersion())) {
        _deployedUseBundleContent.add(dp);
      }
      else {
        throw new ResolverException("Bundle " + info.getSymbolicName() + " at version " + info.getVersion() + " is not in the range " + appContentRange + " or " + useBundleRange);
      }

Examples of org.apache.avalon.meta.info.ReferenceDescriptor.matches()

    public void testCompliance()
    {
        ReferenceDescriptor ref = new ReferenceDescriptor( m_classname, m_version );
        ReferenceDescriptor any = new ReferenceDescriptor( m_classname, new Version( -1, 0, 0 ) );

        assertTrue( "anything matches explicit", any.matches( ref ) );
        assertFalse( "explicit does not match anything", ref.matches( any ) );
    }

    public void testSerialization() throws IOException, ClassNotFoundException
    {

Examples of org.apache.avalon.meta.info.Service.matches()

        assertEquals( m_reference, service.getReference());
        assertEquals( m_reference.getClassname(), service.getClassname());
        assertEquals( m_reference.getVersion(), service.getVersion());

        assertEquals( m_entries.length, service.getEntries().length );
        assertTrue( service.matches(m_reference));

        EntryDescriptor[] serviceEntries = service.getEntries();
        for (int i = 0; i < m_entries.length; i++)
        {
            assertEquals( m_entries[i], serviceEntries[i]);

Examples of org.apache.camel.BinaryPredicate.matches()

    public static void assertMatches(Predicate predicate, String text, Exchange exchange) {
        if (predicate instanceof BinaryPredicate) {
            // special for binary evaluable as we can get more detailed information
            BinaryPredicate eval = (BinaryPredicate) predicate;
            if (!eval.matches(exchange)) {
                String evalText = eval.getLeftValue() + " " + eval.getOperator() + " " + eval.getRightValue();
                if (text == null) {
                    throw new AssertionError(predicate + " evaluated as " + evalText + "  on " + exchange);
                } else {
                    throw new AssertionError(text + predicate + " evaluated as: " + evalText + " on " + exchange);

Examples of org.apache.camel.Predicate.matches()

        return jndi;
    }

    public void testSimpleExpressionOrPredicate() throws Exception {
        Predicate predicate = SimpleLanguage.predicate("${header.bar} == 123");
        assertTrue(predicate.matches(exchange));

        predicate = SimpleLanguage.predicate("${header.bar} == 124");
        assertFalse(predicate.matches(exchange));

        Expression expression = SimpleLanguage.expression("${body}");

Examples of org.apache.camel.builder.NotifyBuilder.matches()

        for (int i = 0; i < 10; i++) {
            template.sendBody("seda:throttleCount", "Message " + i);
        }

        assertTrue(notifier.matches(2, TimeUnit.SECONDS));
        Integer throttledMessages = (Integer) mbeanServer.getAttribute(throttlerName, "ThrottledCount");

        // we are expecting this to be > 0
        assertTrue(throttledMessages.intValue() > 0);

Examples of org.apache.camel.impl.scan.AnnotatedWithPackageScanFilter.matches()

                    if (StringHelper.hasUpperCase(pkg)) {
                        // its a FQN class name so load it directly
                        LOG.trace("Loading {} class", pkg);
                        try {
                            Class<?> clazz = bundle.loadClass(pkg);
                            if (test.matches(clazz)) {
                                classes.add(clazz);
                            }
                            // the class could be found and loaded so continue to next
                            continue;
                        } catch (Throwable t) {
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.