Search code examples
javadesign-patternsfactory-pattern

What type of class instantiates the factory class?


If i need a factory to create a complex aggregate object, what class instantiates the factory class so to keep my code mockable and testable? A DI container will not be used in this scenario. Some 'type' of class has to bring everything together, no?

Thanks!


Solution

  • The Composition Root ultimately brings it all together.