Improve Prototype Javadoc

This commit is contained in:
Ilkka Seppala
2015-10-04 00:04:12 +03:00
parent 40e378c1f3
commit 9a4f83e7b8

View File

@ -2,9 +2,14 @@ package com.iluwatar.prototype;
/** /**
* *
* In Prototype we have a factory class ({@link HeroFactoryImpl}) producing objects by * The Prototype pattern is a creational design pattern in software development. It is
* cloning the existing ones. In this example the factory's prototype objects are * used when the type of objects to create is determined by a prototypical instance,
* given as constructor parameters. * which is cloned to produce new objects. This pattern is used to:
* - avoid subclasses of an object creator in the client application, like the abstract factory pattern does.
* - avoid the inherent cost of creating a new object in the standard way (e.g., using the 'new' keyword)
* <p>
* In this example we have a factory class ({@link HeroFactoryImpl}) producing objects by
* cloning the existing ones. The factory's prototype objects are given as constructor parameters.
* *
*/ */
public class App { public class App {