{
String substr = (String)packages.get (entry.fullName ());
if (substr != null)
{
String pkg = null;
ModuleEntry mod = null;
ModuleEntry prev = null;
while (substr != null)
{
int dot = substr.indexOf ('.');
if (dot < 0)
{
pkg = substr;
substr = null;
}
else
{
pkg = substr.substring (0, dot);
substr = substr.substring (dot + 1);
}
String fullName = prev == null ? pkg : prev.fullName () + '/' + pkg;
mod = (ModuleEntry)symbolTable.get (fullName);
if (mod == null)
{
mod = factory.moduleEntry ();
mod.name (pkg);
mod.container (prev);
if (prev != null) mod.module (prev.fullName ());
symbolTable.put (pkg, mod);
}
prev = mod;
}
entry.module (mod.fullName ());