src/java/fr/jayasoft/ivy/DefaultDependencyDescriptor.java
/**
     * Transforms a dependency descriptor using the given transformer.
     * 
     * Note that no namespace info will be attached to the transformed dependency descriptor, 
     * so calling doesExclude is not recommended (doesExclude only works when namespace is properly set)
     * @param dd
     * @param t
     * @return
     */
Transforms a dependency descriptor using the given transformer.

Note that no namespace info will be attached to the transformed dependency descriptor,
so calling doesExclude is not recommended (doesExclude only works when namespace is properly set)
@param dd
@param t
@return
Transforms a dependency descriptor using the given transformer . Note that no namespace info will be attached to the transformed dependency descriptor so calling doesExclude is not recommended ( doesExclude only works when namespace is properly set ) @param dd @param t @return
public static DefaultDependencyDescriptor transformInstance(DependencyDescriptor dd, NamespaceTransformer t, boolean fromSystem) {
        ModuleRevisionId transformParentId = t.transform(dd.getParentRevisionId());
        ModuleRevisionId transformMrid = t.transform(dd.getDependencyRevisionId());
        DefaultDependencyDescriptor newdd = new DefaultDependencyDescriptor();
        newdd._parentId = transformParentId;
        newdd._revId = transformMrid;
        newdd._force = dd.isForce();
        newdd._changing = dd.isChanging();
        newdd._transitive = dd.isTransitive();
        String[] moduleConfs = dd.getModuleConfigurations();
        if (moduleConfs.length == 1 && "*".equals(moduleConfs[0])) {
            if (dd instanceof DefaultDependencyDescriptor) {
                DefaultDependencyDescriptor ddd = (DefaultDependencyDescriptor)dd;
                newdd._confs = new HashMap(ddd._confs);
                newdd._artifactsExcludes = new HashMap(ddd._artifactsExcludes);
                newdd._artifactsIncludes = new HashMap(ddd._artifactsIncludes);
            } else {
                throw new IllegalArgumentException("dependency descriptor transformation does not support * module confs with descriptors which aren't DefaultDependencyDescriptor");
            }
        } else {
            for (int i = 0; i < moduleConfs.length; i++) {
                newdd._confs.put(moduleConfs[i], new ArrayList(Arrays.asList(dd.getDependencyConfigurations(moduleConfs[i]))));
                newdd._artifactsExcludes.put(moduleConfs[i], new ArrayList(Arrays.asList(dd.getDependencyArtifactsExcludes(moduleConfs[i]))));
                newdd._artifactsIncludes.put(moduleConfs[i], new ArrayList(Arrays.asList(dd.getDependencyArtifactsIncludes(moduleConfs[i]))));
            }
        }
        if (fromSystem) {
        	newdd._asSystem = dd;
        }
        return newdd;
    }
public static DefaultDependencyDescriptor transformInstance ( DependencyDescriptor dd , NamespaceTransformer t , boolean fromSystem ) { ModuleRevisionId transformParentId = t . transform ( dd . getParentRevisionId ( ) ) ; ModuleRevisionId transformMrid = t . transform ( dd . getDependencyRevisionId ( ) ) ; DefaultDependencyDescriptor newdd = new DefaultDependencyDescriptor ( ) ; newdd . _parentId = transformParentId ; newdd . _revId = transformMrid ; newdd . _force = dd . isForce ( ) ; newdd . _changing = dd . isChanging ( ) ; newdd . _transitive = dd . isTransitive ( ) ; String [ ] moduleConfs = dd . getModuleConfigurations ( ) ; if ( moduleConfs . length == 1 && "*" . equals ( moduleConfs [ 0 ] ) ) { if ( dd instanceof DefaultDependencyDescriptor ) { DefaultDependencyDescriptor ddd = ( DefaultDependencyDescriptor ) dd ; newdd . _confs = new HashMap ( ddd . _confs ) ; newdd . _artifactsExcludes = new HashMap ( ddd . _artifactsExcludes ) ; newdd . _artifactsIncludes = new HashMap ( ddd . _artifactsIncludes ) ; } else { throw new IllegalArgumentException ( "dependency descriptor transformation does not support * module confs with descriptors which aren't DefaultDependencyDescriptor" ) ; } } else { for ( int i = 0 ; i < moduleConfs . length ; i ++ ) { newdd . _confs . put ( moduleConfs [ i ] , new ArrayList ( Arrays . asList ( dd . getDependencyConfigurations ( moduleConfs [ i ] ) ) ) ) ; newdd . _artifactsExcludes . put ( moduleConfs [ i ] , new ArrayList ( Arrays . asList ( dd . getDependencyArtifactsExcludes ( moduleConfs [ i ] ) ) ) ) ; newdd . _artifactsIncludes . put ( moduleConfs [ i ] , new ArrayList ( Arrays . asList ( dd . getDependencyArtifactsIncludes ( moduleConfs [ i ] ) ) ) ) ; } } if ( fromSystem ) { newdd . _asSystem = dd ; } return newdd ; }
Transforms a dependency descriptor using the given transformer.
Transforms a dependency descriptor using the given transformer .