Examples of matches()


Examples of org.codehaus.aspectwerkz.regexp.CallerSidePattern.matches()

            return false;
        }
        CallerSidePattern pattern = (CallerSidePattern)m_memberPattern;
        for (Iterator it = interfaces.iterator(); it.hasNext();) {
            InterfaceMetaData interfaceMetaData = (InterfaceMetaData)it.next();
            if ((pattern.matches(interfaceMetaData.getName(), memberMetaData))) {
                return true;
            }
            else {
                if (matchInterfacesCallee(interfaceMetaData.getInterfaces(), memberMetaData)) {
                    return true;

Examples of org.codehaus.aspectwerkz.regexp.ClassPattern.matches()

*/
public class ClassPatternTest extends TestCase {

    public void testMatchMethodName1() {
        ClassPattern classPattern = Pattern.compileClassPattern("foo.bar.SomeClass");
        assertFalse(classPattern.matches("SomeClass"));
        assertTrue(classPattern.matches("foo.bar.SomeClass"));
        assertFalse(classPattern.matches("Class"));
        assertFalse(classPattern.matches(""));
    }

Examples of org.codehaus.plexus.util.MatchPatterns.matches()

            pathsAsList = Arrays.asList( ignorePathsToDelete );
        }

        for ( String name : deleted )
        {
            if ( ignoreDeleteMatchPatterns != null && ignoreDeleteMatchPatterns.matches( name, true ) )
            {
                getLog().debug(
                    name + " match one of the patterns '" + pathsAsList + "': do not add to deleted files" );
                continue;
            }

Examples of org.codenarc.source.SourceCodeCriteria.matches()

        SourceCodeCriteria criteria = new SourceCodeCriteria();
        criteria.setApplyToFilesMatching(getApplyToFilesMatching());
        criteria.setDoNotApplyToFilesMatching(getDoNotApplyToFilesMatching());
        criteria.setApplyToFileNames(getApplyToFileNames());
        criteria.setDoNotApplyToFileNames(getDoNotApplyToFileNames());
        return criteria.matches(sourceCode);
    }

    private String getClassNameNoPackage() {
        String className = getClass().getName();
        int indexOfLastPeriod = className.lastIndexOf('.');

Examples of org.codenarc.util.WildcardPattern.matches()

        String applyTo = getApplyToClassNames();
        String doNotApplyTo = getDoNotApplyToClassNames();

        if (applyTo != null  && applyTo.length() > 0) {
            WildcardPattern pattern = new WildcardPattern(applyTo, true);
            shouldApply = pattern.matches(classNode.getNameWithoutPackage()) || pattern.matches(classNode.getName());
        }

        if (shouldApply && doNotApplyTo != null && doNotApplyTo.length() > 0) {
            WildcardPattern pattern = new WildcardPattern(doNotApplyTo, true);
            shouldApply = !pattern.matches(classNode.getNameWithoutPackage()) && !pattern.matches(classNode.getName());

Examples of org.cometd.bayeux.ChannelId.matches()

        Assert.assertTrue(foobar0.matches(foobar0));
        Assert.assertTrue(foobar0.matches(foobar1));

        Assert.assertFalse(foo.matches(foobar0));
        Assert.assertTrue(wild.matches(foobar0));
        Assert.assertTrue(deep.matches(foobar0));

        Assert.assertFalse(foo.matches(foobarbaz));
        Assert.assertFalse(wild.matches(foobarbaz));
        Assert.assertTrue(deep.matches(foobarbaz));
    }

Examples of org.dcm4che3.data.Attributes.matches()

            boolean ignoreCaseOfPN, boolean matchNoValue)
            throws IOException {
        while (offset != 0) {
            Attributes item = readRecord(offset);
            if (inUse(item) && !(ignorePrivate && isPrivate(item))
                    && (keys == null || item.matches(keys, ignoreCaseOfPN, matchNoValue)))
                return item;
            offset = item.getInt(Tag.OffsetOfTheNextDirectoryRecord, 0);
        }
        return null;
    }

Examples of org.dom4j.NodeFilter.matches()

        List list = document.selectNodes("//author");

        for (Iterator iter = list.iterator(); iter.hasNext();) {
            Node node = (Node) iter.next();

            if (nodeFilter.matches(node)) {
                log("Matches node: " + node.asXML());
            } else {
                log("No match for node: " + node.asXML());
            }
        }

Examples of org.dom4j.XPath.matches()

            Element conditionvar = (Element) el_respc.selectSingleNode(".//conditionvar");
            // there is an evaluation defined (a "resprocessing" element exists)
            // if (xpath(count(.//varequal) + count(.//not) = count(.//*)) is
            // true, then there are only "not" and "varequal" elements
            XPath xCanHandle = DocumentHelper.createXPath("count(.//varequal) + count(.//not) = count(.//*)");
            boolean canHandle = xCanHandle.matches(conditionvar);
            if (!canHandle) { // maybe we have <condvar> <and> <...>, try again
              Element el_and = (Element) conditionvar.selectSingleNode("and");
              if (el_and != null) {
                canHandle = xCanHandle.matches(el_and);
                if (canHandle) { // simultate the el_and to be the conditionvar

Examples of org.dom4j.rule.Pattern.matches()

        log("");
        log(description);

        Pattern pattern = factory.createPattern(match);

        assertTrue(description, pattern.matches(testContext));
    }

    protected void testFilter(Element documentTest, Element context,
            Element pattern) throws Exception {
        String match = pattern.attributeValue("match");
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.