subfactory
A subfactory is a design pattern used in object-oriented programming. It is a specialized factory object whose responsibility is to create a particular type of object, often a variation or a specific instance of a more general type. In essence, a subfactory acts as a subordinate to a main factory or a creator of a product family.
The purpose of a subfactory is to encapsulate the creation logic for a subset of objects. This
Subfactories are particularly useful when the creation process for certain objects is complex or when there