Moved, and also refactored to use this method in InjectAdapterProcessor and ModuleAdapterProcessor