code: public void resolveDependencies() {
  		if (dependenciesResolved) {
  			throw new Error("Can resolve dependencies only once");
  		}
  		dependenciesResolved = true;
  
  		// resolve outer classes first
  		for (ClassModel classModel : classes.values()) {
  			classModel.resolveOuterClass();
  		}
  
  		// resolve used classes and the module
  		for (ClassModel classModel : classes.values()) {
  			classModel.resolveUsedClasses();
  			if (classModel.outerClass == null) {
  				classModel.resolveModule();
  			}
  		}
  
  		// remove inner classes
  		for (ClassModel classModel : new ArrayList<>(classes.values())) {
  			if (classModel.outerClass != null) {
  				// merge class with toplevel class
  				classModel.getToplevelClass().usesClasses
  						.addAll(classModel.usesClasses);
  				classes.remove(classModel.getQualifiedName());
  			}
  		}
  
  		for (ModuleModel moduleModel : modules.values()) {
  			moduleModel.resolveDependencies();
  		}
  
  		calculateModuleDepenendencies();
  	}
docs: Resolve class names recorded during parsing to the actual model objects
  and calculate transitive closures.