Description
Triggered by gh-24644, the unique capabilities of getBeanProvider
(which include stream-based access to generic type matches as well as ordered stream access) are useful for many purposes but miss a key ingredient from the simpler ListableBeanFactory
retrieval methods: namely the ability to suppress eager initialization for type checks. Introducing dedicated getBeanProvider
variants with an allowEagerInit
flag at ListableBeanFactory
level closes that gap without introducing the concept of eager/lazy type initialization at the basic BeanFactory
level (where no other such methods with an allowEagerInit
flag exist).
There is also an includeNonSingletons
flag on those ListableBeanFactory
retrieval methods which we are not mirroring here since it is less useful in general and potentially irritating in terms of semantics for the full set of ObjectProvider
retrieval methods.