mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-12 06:14:07 +00:00
#354 Add maven model for feature toggle design pattern
This commit is contained in:
1 parent
cf10bd1d05
commit
d7526fc7c0
86 files changed
+1165
-270
No files matched your search
@@ -10,20 +10,23 @@ tags:
|
||||
- Gang Of Four
|
||||
---
|
||||
|
||||
**Also known as:** Virtual Constructor
|
||||
## Also known as
|
||||
Virtual Constructor
|
||||
|
||||
**Intent:** Define an interface for creating an object, but let subclasses
|
||||
## Intent
|
||||
Define an interface for creating an object, but let subclasses
|
||||
decide which class to instantiate. Factory Method lets a class defer
|
||||
instantiation to subclasses.
|
||||
|
||||

|
||||
|
||||
**Applicability:** Use the Factory Method pattern when
|
||||
## Applicability
|
||||
Use the Factory Method pattern when
|
||||
|
||||
* a class can't anticipate the class of objects it must create
|
||||
* a class wants its subclasses to specify the objects it creates
|
||||
* classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate
|
||||
|
||||
**Credits**
|
||||
## Credits
|
||||
|
||||
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)
|
||||
Reference in new issue
Block a user