spring-framework / org.springframework.beans.factory / BeanFactoryUtils / countBeansIncludingAncestors

countBeansIncludingAncestors

open static fun countBeansIncludingAncestors(lbf: ListableBeanFactory): Int

Count all beans in any hierarchy in which this factory participates. Includes counts of ancestor bean factories.

Beans that are "overridden" (specified in a descendant factory with the same name) are only counted once.

Parameters

lbf - the bean factory

Return
count of beans including those defined in ancestor factories