public MultiName getMultiName(String name)
{
assert name != null : "Info.getMultiName called on null";
MultiName result;
int lastIndex = name.lastIndexOf(":");
if (lastIndex < 0)
{
lastIndex = name.lastIndexOf(".");
}
if (lastIndex > 0)
{
result = new MultiName(new String[] {name.substring(0, lastIndex)},
name.substring(lastIndex + 1));
}
else if ((qualifiedImports != null) && qualifiedImports.containsKey(name))
{
result = new MultiName(new String[] {qualifiedImports.get(name)}, name);
}
else if (imports != null)
{
String[] namespaces = new String[imports.size() + 1];
imports.toArray(namespaces);
namespaces[imports.size()] = "";
result = new MultiName(namespaces, name);
}
else
{
result = new MultiName(name);
}
return result;
}