jodd-petite/src/main/java/jodd/petite/PetiteBeans.java
public void forEachBean(final Consumer<BeanDefinition> beanDefinitionConsumer) {
		final Set<String> names = beanNames();
		for (String beanName : names) {
			BeanDefinition beanDefinition = lookupBeanDefinition(beanName);

			if (beanDefinition != null) {
				beanDefinitionConsumer.accept(beanDefinition);
			}
		}
	}
public void forEachBean(final Consumer<BeanDefinition> beanDefinitionConsumer) {
		final Set<String> names = beanNames();
		for (String beanName : names) {
			BeanDefinition beanDefinition = lookupBeanDefinition(beanName);

			if (beanDefinition != null) {
				beanDefinitionConsumer.accept(beanDefinition);
			}
		}
	}
Iterates all beans. Iteration occurs over the {@link #beanNames() snapshot of bean names}.