官术网_书友最值得收藏!

UML class structure

The following UML diagram shows all the components of the Prototype design pattern:

UML diagram for Prototype design pattern

Let's see these components as listed in following points:

  • Prototype: The Prototype is an interface. It is uses the clone method to create instances of this interface type.
  • ConcretePrototype: This is a concrete class of the Prototype interface to implement an operation to clone itself.
  • Client: This is a caller class to create a new object of a Prototype interface by calling a clone method of the prototype interface.

Let's see a sample implementation of the prototype design pattern.

主站蜘蛛池模板: 怀集县| 肥乡县| 新沂市| 福建省| 乌兰察布市| 郑州市| 清镇市| 南丰县| 天镇县| 巫溪县| 泗洪县| 普格县| 灵丘县| 虹口区| 子洲县| 南安市| 惠州市| 营山县| 永年县| 寻乌县| 宜君县| 平阴县| 庆城县| 杭州市| 九江市| 辰溪县| 稻城县| 西畴县| 纳雍县| 和政县| 开平市| 仙桃市| 田林县| 百色市| 昆山市| 额济纳旗| 罗定市| 宣汉县| 祁东县| 眉山市| 兴山县|