This tag is ambiguous. It may refer to one of the GoF patterns: Factory Method ([factory-method]) or Abstract Factory ([abstract-factory]). It may refer to patterns outside the GoF book. It may refer to all Factory ([factory]) patterns collectively, or it may refer to some other creational pattern. Please use another tag instead of this one.
This tag is ambiguous and alternatives should be used instead.
Consider one or more of the following.
- factory-method is a pattern from the GoF book, based on inheritance.
- abstract-factory is a pattern from the GoF book, based on composition.
- static-factory is a pattern from Effective Java, based on static methods.
- Simple Factory is a pattern from Head First Design Patterns, based on branching logic (
if
/else
orswitch
/case
). - factory is a category encompassing all of these patterns and more.
Also consider using the design-patterns tag in addition to or instead of those listed above.