}
List dependencies = m_component.getDependencies();
// the first dependency is always the dependency on the resource, which
// will be replaced with a more specific dependency below
dependencies.remove(0);
ResourceDependency resourceDependency = m_manager.createResourceDependency()
.setResource(resource)
.setCallbacks(m_callbackInstance, m_callbackAdded, m_callbackChanged, null)
.setAutoConfig(m_callbackAdded == null)
.setRequired(true);
if (m_propagateCallbackInstance != null && m_propagateCallbackMethod != null) {
resourceDependency.setPropagate(m_propagateCallbackInstance, m_propagateCallbackMethod);
} else {
resourceDependency.setPropagate(m_propagate);
}
Component service = m_manager.createComponent()
.setInterface(m_serviceInterfaces, props)
.setImplementation(m_serviceImpl)
.setFactory(m_factory, m_factoryCreateMethod) // if not set, no effect