@Override
	public ModuleOptions interpolate(final Map<String, String> raw) throws BindException {

		final Map<String, ModuleOptions> delegates = new HashMap<String, ModuleOptions>();
		Map<String, Map<String, String>> valuesWithoutPrefix = new HashMap<String, Map<String, String>>();
		for (String prefix : composedModuleDefinitions.keySet()) {
			valuesWithoutPrefix.put(prefix, new HashMap<String, String>());
		}

		BindingResult bindingResult = new BeanPropertyBindingResult(this, "options");


		for (Entry<String, String> entry : raw.entrySet()) {
			String key = entry.getKey();
			int separator = key.indexOf(OPTION_SEPARATOR);
			if (separator == -1) {
				bindingResult.addError(new FieldError("options", key, String.format("unsupported option '%s'", key)));
				continue;
			}
			String prefix = key.substring(0, separator);
			String suffix = key.substring(separator + OPTION_SEPARATOR.length());
			Map<String, String> map = valuesWithoutPrefix.get(prefix);
			if (map == null) {
				bindingResult.addError(new FieldError("options", key, String.format("unsupported option '%s'", key)));
				continue;
			}
			map.put(suffix, entry.getValue());
		}

		if (bindingResult.hasErrors()) {
			throw new BindException(bindingResult);
		}

		for (String prefix : composedModuleDefinitions.keySet()) {
			Map<String, String> subMap = valuesWithoutPrefix.get(prefix);
			ModuleOptions interpolated = composedModuleDefinitions.get(prefix).interpolate(subMap);
			delegates.put(prefix, interpolated);
		}

		return new ModuleOptions() {

			@Override
			public EnumerablePropertySource<?> asPropertySource() {
				Map<String, EnumerablePropertySource<?>> pss = new HashMap<String, EnumerablePropertySource<?>>();
				for (Entry<String, ModuleOptions> entry : delegates.entrySet()) {
					pss.put(entry.getKey(), entry.getValue().asPropertySource());
				}
				return new HierarchicalEnumerablePropertySource("foo", pss);
			}

			/**
			 * The composed module itself never needs to activate profiles. It's the submodules that should. The keys
			 * returned here are special constructs that are decoded by {@link PrefixNarrowingModuleOptions}.
			 */
			@Override
			public String[] profilesToActivate() {
				List<String> result = new ArrayList<String>(delegates.size());
				for (String prefix : delegates.keySet()) {
					ModuleOptions delegate = delegates.get(prefix);
					for (String p : delegate.profilesToActivate()) {
						result.add(qualifyProfile(prefix, p));
					}
				}
				return result.toArray(new String[result.size()]);
			}

			@Override
			public void validate() {
				for (ModuleOptions delegate : delegates.values()) {
					delegate.validate();
				}
			}
		};
	}
A composite {@link ModuleOptionsMetadata} made of several {@link ModuleOptionsMetadata}, each assigned to a name,
that will appear in a hierarchy. Used to represent options to a composite module.

@author Eric Bottard
@author Gary Russell
spring-xd-module/src/main/java/org/springframework/xd/module/options/HierarchicalCompositeModuleOptionsMetadata.java