Call update with the actual TypeEntry. This updates all of the
referrant TypeEntry's that were registered.
boolean done = false;
while (!done) {
done = true; // Assume this is the last pass
// Call updatedUndefined for all items on the list
// updateUndefined returns true if the state of the te TypeEntry
// is changed. The outer loop is traversed until there are no more
// state changes.
for (int i = 0; i < list.size(); i++) {
TypeEntry te = (TypeEntry) list.elementAt(i);
if (te.updateUndefined(undefinedType, def)) {
done = false; // Items still undefined, need another pass
}
}
}
// It is possible that the def TypeEntry depends on an Undefined type.
// If so, register all of the entries with the undefined type.
TypeEntry uType = def.getUndefinedTypeRef();
if (uType != null) {
for (int i = 0; i < list.size(); i++) {
TypeEntry te = (TypeEntry) list.elementAt(i);
((Undefined) uType).register(te);
}
}