public void componentRegistered(ComponentDefinition componentDefinition) {
// make sure that all components that come through are safe for the model
if (componentDefinition.getSource() == null) {
if (componentDefinition instanceof BeanComponentDefinition) {
((AbstractBeanDefinition) ((BeanComponentDefinition) componentDefinition).getBeanDefinition())
.setSource(new DefaultModelSourceLocation(1, 1, resource));
}
}
registerComponentDefinition(componentDefinition, elementProviders);
}