01-01 Creational Patterns
来源:互联网 发布:ubuntu win10启动项 编辑:程序博客网 时间:2024/05/01 13:54
Overview
When will use it
Creational patterns prescribe the way that objects are created. These patterns are used when a decision must be made at the time a class is instantiated. Typically, the details of the classes that are instantiated – what exactly they are, how, and when they are created – are encapsulated by an abstract superclass and hidden from the client class, which knows only about the abstract class or the interface it implements. The specific type of the concrete class is typically unknown to the client class
What Design Pattern Does it Include
Factory Method
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. Varying: subclass of object that is instantiated.
Abstract Factory
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.Varying: families of product objects.
Builder
Separate the construction of a complex object from its representation so that the same construction process can create different representations.
Varying: how a composite object gets created.
Prototype
Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
Varying: class of object that is instantiated.
Singleton
Ensure a class only has one instance, and provide a global point of access to it.
Varying: the sole instance of a class
- 01-01 Creational Patterns
- Creational patterns
- SUMMARY OF CREATIONAL PATTERNS
- Creational patterns_Java design patterns
- Design Pattern----Creational Patterns
- Singleton Pattern(GoF-Creational Design Patterns)
- Design Pattern - Creational Patterns - Factory Pattern
- Design Pattern - Creational Patterns - Singleton Pattern
- Design Pattern - Creational Patterns - Prototype Pattern
- Creational Patterns Part 1/5: Factory Pattern
- Creational Patterns Part 3/5: Singleton Pattern
- Creational Patterns Part 4/5: Builder Pattern
- Creational Patterns Part 5/5: Prototype Pattern
- Design Pattern - Creational Patterns - Builder Pattern
- Design Pattern - Creational Patterns - Abstract Factory Pattern
- Java设计模式--创建型模式(Creational Patterns)
- Creational Patterns Part 2/5: Abstract Factory Pattern
- GoF--Creational Design Patterns 创建型设计模式(一)
- 操作符重载[ ];
- Unity3D学习笔记《Space Shooter》二
- mezzanine timezone 的问题
- socket通信之八:完成端口模型实现的客户/服务器模型
- partial关键字
- 01-01 Creational Patterns
- Android ArrayAdapter 详解
- Linux内核中trace_xxxx()函数的定义
- POJ2309 BST(树状数组)
- 欢迎来挑战:极限打印99乘法表
- 九度OJ-题目1003:A+B
- HDU5003-Osu!-AsiaRegionalAnshanOnline2014
- 修改view的x,y,width,height值的方法
- Unable to locate the model you have specified