If the given context is assignable to AutowireCapbleBeanFactory or contains a parent or a factory that is, then
set the autoWiringFactory appropriately.
Simple implementation of the ObjectFactory that makes use of Spring's application context if one has been configured,
before falling back on the default mechanism of instantiating a new class using the class name.