private List<ModuleDefinition> createComposedModuleDefinitions(
			List<ModuleDescriptor> moduleDescriptors) {

		List<ModuleDefinition> moduleDefinitions = new ArrayList<ModuleDefinition>(moduleDescriptors.size());
		for (ModuleDescriptor moduleDescriptor : moduleDescriptors) {
			moduleDefinitions.add(registry.findDefinition(moduleDescriptor.getModuleName(),
					moduleDescriptor.getType()));
		}
		return moduleDefinitions;
	}
Throws an exception if either one of the following is true:<ul>
    <li>a module with the given name and type already exists and force is {@code false}</li>
    <li>force if {@true} but the module is in use (by a stream or composed module)</li>
</ul>

<p>Also, will actually delete the already existing definition in case of an update,
even though it would be overwritten by a registry, to cover the cases where a composed
module is being replaced by a simple uploaded module, and <i>vice versa</i>.</p>

@param name name of the module we're trying to update/create
@param type type of the module we're trying to update/create
@param force whether to attempt to force update if the module already exists
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/support/ModuleDefinitionService.java