I think C# handles this pretty well. You include namespaces with whatever granularity you need, down to a single class (or interface or whatever) and can alias them.
using MyProject.Domian.Entities; //the whole module
using Routes = MyProject.Api.Contract.Routes.Http; //an aliased single class
I bet Java had this too, C# us still mostly Java: Microsoft Edition.