Generator loads only non-static properties.
Added property $factories and methods setFactory () and getFactory () for nesting stubs.