InstanceFactory factory = (InstanceFactory) factoryMap.get(type);
if (factory == null) {
factoryMap.put(type, new SingleValueInstanceFactory(value));
} else {
factoryMap.put(type, new ChainedInstanceFactory(factory, new SingleValueInstanceFactory(value)));
}
}