public ModuleDefinition compose(String name, ModuleType typeHint, String dslDefinition) {
// TODO: pass typeHint to parser (XD-2343)
List<ModuleDescriptor> parseResult = this.parser.parse(name, dslDefinition, module);
ModuleType type = this.determineType(parseResult);
if (registry.findDefinition(name, type) != null) {
throw new ModuleAlreadyExistsException(name, type);
}
// TODO: XD-2284 need more than ModuleDefinitions (need to capture passed in options, etc)