final NewMethod newMethod = abstractMethod.copy(beanFactory);
newMethod.setAbstract(false);
newMethod.setFinal(true);
newMethod.setNative(false);
final GetEagerSingletonBeanNames body = new GetEagerSingletonBeanNames();
newMethod.setBody(body);
int eagerSingletonBeanCount = 0;
int lazySingletonBeanCount = 0;
final Iterator<Bean> beansIterator = beans.values().iterator();
while (beansIterator.hasNext()) {
final Bean bean = (Bean) beansIterator.next();
if (false == bean.isSingleton()) {
continue;
}
// only singletons can be singletons.
final boolean eager = bean.isEagerLoaded();
if (eager) {
body.addBean(bean.getId());
eagerSingletonBeanCount++;
context.debug(bean.toString());
} else {
lazySingletonBeanCount++;