Examples of matches()


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

public class PackageScanFiltersTest extends TestCase {

    public void testAssignableToPackageScanFilter() {
        AssignableToPackageScanFilter filter = new AssignableToPackageScanFilter();
        assertFalse(filter.matches(ScanTargetOne.class));

        filter = new AssignableToPackageScanFilter(ScanTargetOne.class);
        validateFilter(filter, ScanTargetOne.class);

        filter = new AssignableToPackageScanFilter(ScanTargetOne.class);

Examples of org.apache.camel.spi.PackageScanFilter.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) {

Examples of org.apache.camel.support.XMLTokenExpressionIterator.AttributedQName.matches()

public class AttributedQNameTest extends Assert {

    @Test
    public void testMatches() {
        AttributedQName aqname = new AttributedQName("urn:foo", "petra");
        assertTrue(aqname.matches(new QName("urn:foo", "petra")));
        assertFalse(aqname.matches(new QName("urn:bar", "petra")));
        assertFalse(aqname.matches(new QName("urn:foo", "petira")));
       
        aqname = new AttributedQName("urn:foo", "*tra");
        assertTrue(aqname.matches(new QName("urn:foo", "petra")));

Examples of org.apache.ftpserver.usermanager.PasswordEncryptor.matches()

    @Override
    public void testMatches() {
        PasswordEncryptor encryptor = createPasswordEncryptor();
       
        assertTrue(encryptor.matches("foo", "ACBD18DB4CC2F85CEDEF654FCCC4A4D8"));
       
        // check lower case
        assertTrue(encryptor.matches("foo", "acbd18DB4CC2F85CEDEF654FCCC4A4D8"));
       
        assertFalse(encryptor.matches("foo", "bar"));

Examples of org.apache.geronimo.gbean.AbstractNameQuery.matches()

                // Search the GBeans
                for (Iterator iterator = gbeanNames.iterator(); iterator.hasNext();) {
                    Map.Entry entry = (Map.Entry) iterator.next();
                    AbstractName abstractName = (AbstractName) entry.getKey();
                    GBeanData gbeanData = (GBeanData) entry.getValue();
                    if (abstractNameQuery.matches(abstractName, gbeanData.getGBeanInfo().getInterfaces())) {
                        result.add(gbeanData);
                    }
                }
            }
        }

Examples of org.apache.geronimo.gbean.GBeanName.matches()

        }
        Set result = new HashSet(clone.size());
        for (Iterator i = clone.entrySet().iterator(); i.hasNext();) {
            Map.Entry entry = (Map.Entry) i.next();
            GBeanName name = (GBeanName) entry.getKey();
            if (name.matches(domain, properties)) {
                result.add(entry.getValue());
            }
        }
        return result;
    }

Examples of org.apache.geronimo.kernel.repository.Artifact.matches()

    private boolean hasHardDependency(Artifact configurationId, ConfigurationData configurationData) {
        for (Iterator iterator = configurationData.getEnvironment().getDependencies().iterator(); iterator.hasNext();) {
            Dependency dependency = (Dependency) iterator.next();
            Artifact artifact = dependency.getArtifact();
            if (artifact.getVersion() != null && artifact.matches(configurationId)) {
                return true;
            }
        }

        for (Iterator iterator = configurationData.getChildConfigurations().values().iterator(); iterator.hasNext();) {

Examples of org.apache.harmony.pack200.AttributeLayout.matches()

    // and that we can change it
    a.add(new AttributeLayout("SourceFile",AttributeLayout.CONTEXT_CLASS,"FROG",15));
    layout = a.getAttributeLayout("SourceFile", AttributeLayout.CONTEXT_CLASS);
    assertNotNull(layout);
    assertEquals("FROG",layout.getLayout());
    assertTrue(layout.matches(1<<15));
    assertFalse(layout.matches(1<<16));
    assertTrue(layout.matches(-1));
    assertFalse(layout.matches(0));
    // and that changes don't affect subsequent defaults
    AttributeLayoutMap b = new AttributeLayoutMap();

Examples of org.apache.harmony.unpack200.AttributeLayout.matches()

                "FROG", 15));
        layout = a.getAttributeLayout("SourceFile",
                AttributeLayout.CONTEXT_CLASS);
        assertNotNull(layout);
        assertEquals("FROG", layout.getLayout());
        assertTrue(layout.matches(1 << 15));
        assertFalse(layout.matches(1 << 16));
        assertTrue(layout.matches(-1));
        assertFalse(layout.matches(0));
        // and that changes don't affect subsequent defaults
        AttributeLayoutMap b = new AttributeLayoutMap();

Examples of org.apache.isis.runtimes.dflt.runtime.persistence.query.PersistenceQueryBuiltIn.matches()

        }

        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
        final List<ObjectAdapter> instances = new ArrayList<ObjectAdapter>();
        for (final ObjectAdapter instance : facet.iterable(collection)) {
            if (builtIn.matches(instance)) {
                instances.add(instance);
            }
        }
        return instances.toArray(new ObjectAdapter[instances.size()]);
    }
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.