{
if(childClass == PreferencesProvider.class)
{
String name = MapValueConverter.getStringAttribute(PreferencesProvider.NAME, attributes);
String type = MapValueConverter.getStringAttribute(PreferencesProvider.TYPE, attributes);
PreferencesProviderFactory factory = PreferencesProviderFactory.FACTORIES.get(type);
UUID id = UUIDGenerator.generatePreferencesProviderUUID(name, getName());
PreferencesProvider pp = factory.createInstance(id, attributes, this);
pp.setDesiredState(State.INITIALISING, State.ACTIVE);
_preferencesProvider = pp;
return (C)pp;
}
throw new IllegalArgumentException("Cannot create child of class " + childClass.getSimpleName());