List depsSList = (List) dependents.get(depKeys[i]);
for (ListIterator depsIterator = depsSList.listIterator();
depsIterator.hasNext(); )
{
Dependency dy = (Dependency)depsIterator.next();
if (! foundInMemory)
{
debugBuf.append("In Memory Dependencies:\n");
foundInMemory = true;
}
debugBuf.append(dy.getDependent().toString() +
", type " +
dy.getDependent().getClassType() +
", " +
" is dependent on " +
dy.getProvider().getObjectName() +
", type " +
dy.getProvider().getClassType() +
"\n");
}
}
/* Record the in memory dependencies */
Enumeration provs = providers.keys();
UUID[] provKeys = new UUID[providers.size()];
for (int i = 0; provs.hasMoreElements(); i++)
{
/*
** Get all the keys and sort them, so that they will always
** be printed in the same order (we have tests that canonize
** the order of printing the dependencies, and since the key
** is a UUID, the order they are returned from
** hasMoreElements() changes from run to run).
*/
provKeys[i] = (UUID) provs.nextElement();
}
/* Do a bubble sort - there aren't likely to be many elements */
bubbleSort(provKeys);
/* Iterate through the sorted keys */
for (int i = 0; i < provKeys.length; i++)
{
List depsSList = (List) providers.get(provKeys[i]);
for (ListIterator depsIterator = depsSList.listIterator();
depsIterator.hasNext(); )
{
Dependency dy = (Dependency)depsIterator.next();
if (! foundInMemory)
{
debugBuf.append("In Memory Dependencies:\n");
foundInMemory = true;
}
debugBuf.append(
dy.getProvider().toString() +
", type " +
dy.getProvider().getClassType() +
", provides for " +
dy.getDependent().getObjectName() +
", type " +
dy.getDependent().getClassType() +
"\n");
}
}
/* Record the stored dependencies in sorted order to avoid
ordering problems in canons. Also the dependencyDescriptor.getUUID()