Niclas Hedhman a écrit : > Ok, > should we then stop having Module extends XyzFactory, and they are obtained > likewise? Just in case we in future want some other mechanism for the > XyzFactory types, and not depend on the entire Module. > > I think so, as it then becomes more symmetrical and it is not relevant that > ModuleInstance implements ValueBuilderFactory at the moment.
This would mean that we won't anymore be able to: module.newTransient(..) and that we would have to: module.transientBuilderFactory().newTransient(..) These shortcuts are pretty convenient IMO. But, yes, ModuleInstance should delegate all the nifty details to the corresponding services/factories. Right now it contains way too much implementation details of each of these factories.
