code: public static void populateModuleSpecWithModuleDependency(ModuleSpec.Builder moduleSpecBuilder,
              @Nullable Set<String> moduleImportFilterPaths,
              @Nullable Set<String> dependencyExportFilterPaths,
              ModuleIdentifier dependentModuleIdentifier) {
          Objects.requireNonNull(moduleSpecBuilder, "moduleSpecBuilder");
          PathFilter moduleImportFilters = buildFilters(moduleImportFilterPaths, false);
          PathFilter dependencyExportFilters = buildFilters(dependencyExportFilterPaths, false);
          PathFilter importFilters = PathFilters.all(dependencyExportFilters, moduleImportFilters);
          moduleSpecBuilder.addDependency(DependencySpec.createModuleDependencySpec(importFilters, dependencyExportFilters, null, dependentModuleIdentifier, false));
      }
docs: Populate a module spec builder with a dependencies on other modules.
  @param moduleSpecBuilder builder to populate
  @param moduleImportFilterPaths paths valid for importing into the module being built.
  Can be null or empty to indicate that no filters should be applied.
  @param dependencyExportFilterPaths export paths for the dependency being linked
  @param dependentModuleIdentifier used to lookup the latest dependencies. see {@link JBossModuleLoader#getLatestRevisionIds()}