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

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.

主站蜘蛛池模板: 陇川县| 夏邑县| 鄂州市| 肥西县| 克拉玛依市| 烟台市| 盐津县| 肇源县| 新龙县| 五指山市| 济宁市| 富顺县| 新龙县| 西平县| 福海县| 泾阳县| 余江县| 泊头市| 武宣县| 宣恩县| 平谷区| 昭平县| 峨眉山市| 贵溪市| 文山县| 孟村| 滁州市| 筠连县| 彰武县| 海阳市| 孝昌县| 酒泉市| 平顶山市| 桑日县| 时尚| 容城县| 邳州市| 曲水县| 澄城县| 扎兰屯市| 虹口区|