Package org.apache.tapestry.ioc

Examples of org.apache.tapestry.ioc.IdMatcher


        }
    }

    private Collection<DependencyNode<T>> findDependencies(String sourceId, String patternList)
    {
        IdMatcher matcher = buildMatcherForPattern(patternList);

        Collection<DependencyNode<T>> result = newList();

        for (String id : _dependencyNodesById.keySet())
        {
            if (sourceId.equals(id)) continue;

            if (matcher.matches(id)) result.add(_dependencyNodesById.get(id));
        }

        return result;
    }


    {
        List<IdMatcher> matchers = newList();

        for (String pattern : patternList.split(","))
        {
            IdMatcher matcher = new IdMatcherImpl(pattern.trim());

            matchers.add(matcher);
        }

        return matchers.size() == 1 ? matchers.get(0) : new OrIdMatcher(matchers);

        }
    }

    private Collection<DependencyNode<T>> findDependencies(String sourceId, String patternList)
    {
        IdMatcher matcher = buildMatcherForPattern(patternList);

        Collection<DependencyNode<T>> result = newList();

        for (String id : _dependencyNodesById.keySet())
        {
            if (sourceId.equals(id)) continue;

            if (matcher.matches(id)) result.add(_dependencyNodesById.get(id));
        }

        return result;
    }

    {
        List<IdMatcher> matchers = newList();

        for (String pattern : patternList.split(","))
        {
            IdMatcher matcher = new IdMatcherImpl(pattern.trim());

            matchers.add(matcher);
        }

        return matchers.size() == 1 ? matchers.get(0) : new OrIdMatcher(matchers);

        List<IdMatcher> matchers = CollectionFactory.newList();

        for (String pattern : notNull(patterns, "patterns"))
        {
            IdMatcher matcher = new IdMatcherImpl(pattern);
            matchers.add(matcher);
        }

        _idMatcher = new OrIdMatcher(matchers);

    private Collection<DependencyNode<T>> findDependencies(String sourceId, String patternList)
    {
        String sourceModuleId = IOCUtilities.extractModuleId(sourceId);

        IdMatcher matcher = buildMatcherForPattern(sourceModuleId, patternList);

        Collection<DependencyNode<T>> result = newList();

        for (String id : _dependencyNodesById.keySet())
        {
            if (sourceId.equals(id))
                continue;

            if (matcher.matches(id))
                result.add(_dependencyNodesById.get(id));
        }

        return result;
    }

    {
        List<IdMatcher> matchers = newList();

        for (String pattern : patternList.split(","))
        {
            IdMatcher matcher = new IdMatcherImpl(IOCUtilities.toQualifiedId(
                    sourceModuleId,
                    pattern.trim()));
            matchers.add(matcher);
        }

        }
    }

    private Collection<DependencyNode<T>> findDependencies(String sourceId, String patternList)
    {
        IdMatcher matcher = buildMatcherForPattern(patternList);

        Collection<DependencyNode<T>> result = newList();

        for (String id : _dependencyNodesById.keySet())
        {
            if (sourceId.equals(id)) continue;

            if (matcher.matches(id)) result.add(_dependencyNodesById.get(id));
        }

        return result;
    }

    {
        List<IdMatcher> matchers = newList();

        for (String pattern : patternList.split(","))
        {
            IdMatcher matcher = new IdMatcherImpl(pattern.trim());

            matchers.add(matcher);
        }

        return matchers.size() == 1 ? matchers.get(0) : new OrIdMatcher(matchers);

        List<IdMatcher> matchers = CollectionFactory.newList();

        for (String pattern : notNull(patterns, "patterns"))
        {
            IdMatcher matcher = new IdMatcherImpl(pattern);
            matchers.add(matcher);
        }

        _idMatcher = new OrIdMatcher(matchers);

TOP

Related Classes of org.apache.tapestry.ioc.IdMatcher

Copyright © 2018 www.massapicom. 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.