void (RuntimeModuleDescriptor module, Set<RuntimeModuleId> visited, Set<Path> classpath) { if (visited.add(module.getModuleId())) { classpath.addAll(module.getResourceRootPaths()); for (RuntimeModuleDescriptor dep : module.getDependencies()) { collectDependencies(dep, visited, classpath); } } }