src/java/fr/jayasoft/ivy/ant/IvyBuildList.java
/**
     * Returns a collection of ModuleDescriptors that are conatined in the input
     * collection of ModuleDescriptors and upon which the root module depends
     *
     * @param mds input collection of ModuleDescriptors
     * @param rootmd root module
     * @return filtered list of modules
     */
Returns a collection of ModuleDescriptors that are conatined in the input
collection of ModuleDescriptors and upon which the root module depends

@param mds input collection of ModuleDescriptors
@param rootmd root module
@return filtered list of modules
Returns a collection of ModuleDescriptors that are conatined in the input collection of ModuleDescriptors and upon which the root module depends @param mds input collection of ModuleDescriptors @param rootmd root module @return filtered list of modules
private Collection filterModulesFromRoot(Collection mds, ModuleDescriptor rootmd) {
        Map moduleIdMap = new HashMap();
        for (Iterator iter = mds.iterator(); iter.hasNext();) {
            ModuleDescriptor md = ((ModuleDescriptor) iter.next());
            moduleIdMap.put(md.getModuleRevisionId().getModuleId(), md);
        }
        Set toKeep = new HashSet();
        processFilterNodeFromRoot(rootmd, toKeep, moduleIdMap);
        if (_excludeRoot) {
            Message.verbose("Excluded module " + rootmd.getModuleRevisionId().getModuleId().getName());
            toKeep.remove(rootmd);
        }
        for (Iterator iter = toKeep.iterator(); iter.hasNext();) {
            ModuleDescriptor md = ((ModuleDescriptor) iter.next());
            Message.verbose("Kept module " + md.getModuleRevisionId().getModuleId().getName());
        }
        return toKeep;
    }
private Collection filterModulesFromRoot ( Collection mds , ModuleDescriptor rootmd ) { Map moduleIdMap = new HashMap ( ) ; for ( Iterator iter = mds . iterator ( ) ; iter . hasNext ( ) ; ) { ModuleDescriptor md = ( ( ModuleDescriptor ) iter . next ( ) ) ; moduleIdMap . put ( md . getModuleRevisionId ( ) . getModuleId ( ) , md ) ; } Set toKeep = new HashSet ( ) ; processFilterNodeFromRoot ( rootmd , toKeep , moduleIdMap ) ; if ( _excludeRoot ) { Message . verbose ( "Excluded module " + rootmd . getModuleRevisionId ( ) . getModuleId ( ) . getName ( ) ) ; toKeep . remove ( rootmd ) ; } for ( Iterator iter = toKeep . iterator ( ) ; iter . hasNext ( ) ; ) { ModuleDescriptor md = ( ( ModuleDescriptor ) iter . next ( ) ) ; Message . verbose ( "Kept module " + md . getModuleRevisionId ( ) . getModuleId ( ) . getName ( ) ) ; } return toKeep ; }
Returns a collection of ModuleDescriptors that are conatined in the input
 collection of ModuleDescriptors and upon which the root module depends
Returns a collection of ModuleDescriptors that are conatined in the input collection of ModuleDescriptors and upon which the root module depends
// Make a map of ModuleId objects -> ModuleDescriptors
 // recursively process the nodes
 // With the excluderoot attribute set to true, take the rootmd out of the toKeep set.
 // just for logging
