* the dependency revision id asked by the caller
*/
public void addCaller(String rootModuleConf, IvyNode callerNode, String callerConf,
String requestedConf, String[] dependencyConfs, DependencyDescriptor dd) {
ModuleDescriptor md = callerNode.getDescriptor();
ModuleRevisionId mrid = callerNode.getResolvedId();
if (mrid.getModuleId().equals(node.getId().getModuleId())) {
throw new IllegalArgumentException("a module is not authorized to depend on itself: "
+ node.getId());
}
Map callers = (Map) callersByRootConf.get(rootModuleConf);
if (callers == null) {
callers = new HashMap();
callersByRootConf.put(rootModuleConf, callers);
}
Caller caller = (Caller) callers.get(mrid);
if (caller == null) {
caller = new Caller(md, mrid, dd, callerNode.canExclude(rootModuleConf));
callers.put(mrid, caller);
}
caller.addConfiguration(requestedConf, dependencyConfs);
IvyNode parent = callerNode.getRealNode();
for (Iterator iter = parent.getAllCallersModuleIds().iterator(); iter.hasNext();) {
ModuleId mid = (ModuleId) iter.next();
allCallers.put(mid, parent);
}
allCallers.put(mrid.getModuleId(), callerNode);
}