/** * {@inheritDoc} * The returned ComponentAdapter will be an {@link InstanceComponentAdapter}. */ public ComponentAdapter registerComponentInstance(Object componentKey, Object componentInstance) { ComponentAdapter componentAdapter = new InstanceComponentAdapter(componentKey, componentInstance, lifecycleStrategyForInstanceRegistrations); return registerComponent(componentAdapter); }
/** * {@inheritDoc} * The returned ComponentAdapter will be instantiated by the {@link ComponentAdapterFactory} * passed to the container's constructor. */ public ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters) { ComponentAdapter componentAdapter = componentAdapterFactory.createComponentAdapter(componentKey, componentImplementation, parameters); return registerComponent(componentAdapter); }