Skip to content

Commit 2348c03

Browse files
committed
abstract factory
1 parent 70cce89 commit 2348c03

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Abstract Factory
2+
3+
4+
## Intent
5+
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
6+
7+
![Abstract Factory](etc/abstract-factory.png)
8+
9+
## Applicability
10+
11+
- a system should be independent of how its product created, composed and presented.
12+
- a system should be configured one of multiple families of products.
13+
- a families of related product objects is designed to be used together,and you need to enforce this constraint.
14+
- you want to provide a class library of products, and you want to reveal just their interfaces,not their implementations.
15+
Loading

settings.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
rootProject.name = 'java-design-patterns'
2+
def designPatterns = [
3+
'creational-patterns': [
4+
'abstract-factory'
5+
]
6+
];
27

8+
designPatterns.each { catalog, patterns ->
9+
include ":$catalog"
10+
include(patterns.collect { ":$catalog:$it" } as String[])
11+
}

0 commit comments

Comments
 (0)