From 9a4f83e7b804af6620ab03106d7ec613cacfc4a9 Mon Sep 17 00:00:00 2001 From: Ilkka Seppala Date: Sun, 4 Oct 2015 00:04:12 +0300 Subject: [PATCH] Improve Prototype Javadoc --- .../src/main/java/com/iluwatar/prototype/App.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/prototype/src/main/java/com/iluwatar/prototype/App.java b/prototype/src/main/java/com/iluwatar/prototype/App.java index 4003862cb..74bb6989d 100644 --- a/prototype/src/main/java/com/iluwatar/prototype/App.java +++ b/prototype/src/main/java/com/iluwatar/prototype/App.java @@ -2,9 +2,14 @@ package com.iluwatar.prototype; /** * - * In Prototype we have a factory class ({@link HeroFactoryImpl}) producing objects by - * cloning the existing ones. In this example the factory's prototype objects are - * given as constructor parameters. + * The Prototype pattern is a creational design pattern in software development. It is + * used when the type of objects to create is determined by a prototypical instance, + * 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) + *

+ * 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 {