To ease debugging, add bean name to value beans.
For #274 add a basic metadata addition method for factory method beans
For #274 add tests for how factoryBean() should behave
For #274 first cut implementation of factoryBean() resolution - note in particular that it calls getBean() directly for the factory (if a named bean) and for any named arguments that are not overridden. This is a recursive call so if you mess up your dependencies, you can get an infinite loop!

Since a factoryBean() has no way to even get an uninitialized bean out of the named factory, the actual method must be called on the actual factory-bean and the actual arguments must be passed in, fully resolved.

The danger here is that those getBean() calls may fully resolve some beans that are already "in progress" in terms of resolving other dependencies and so those beans may be processed twice.

Also, one big caveat is that factoryBean() provides no way to know (or specify) that the named bean is a singleton, nor what that might mean in this context. So factoryBean()-derived data is considered NOT A SINGLETON. If a named bean should be a singleton, it is the factory's job to provide that caching, NOT DI/1!