Skip to content

Glossary: Software Design Patterns in Java

Simple factory

Also written: factory

One method or class that knows every class and turns a name into the right object, such as `createCarrier("ups")`. A new carrier is one class and one map entry.

Where the book teaches it

Related terms

Factory methodAbstract factorySupplier