Creates a new component instance by calling a factory method on the resolved instance or the component itself.