With the increasing usage of ObjectFactory for dependency injection, and given the nature of the class, I think we should add some annotations to ease static analysis. Notably:
- Spec arrays can be documented using a @phan-param with explicit array types (see examples)
- The method that instantiates the class can be annotated with @phan-template to give phan a chance to understand what class is being created (example). It should be possible to use the template type from within a @phan-param with explicit array type.