Skip to content

Commit c989f6c

Browse files
committed
Improve Factory Method Javadoc
1 parent 516b127 commit c989f6c

File tree

1 file changed

+8
-1
lines changed
  • factory-method/src/main/java/com/iluwatar/factory/method

1 file changed

+8
-1
lines changed

factory-method/src/main/java/com/iluwatar/factory/method/App.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
/**
44
*
5-
* In Factory Method we have an interface ({@link Blacksmith}) with a method for
5+
* The Factory Method is a creational design pattern which uses factory methods to deal
6+
* with the problem of creating objects without specifying the exact class of object
7+
* that will be created. This is done by creating objects via calling a factory
8+
* method either specified in an interface and implemented by child classes, or implemented
9+
* in a base class and optionally overridden by derived classes—rather than by calling a
10+
* constructor.
11+
* <p>
12+
* In this Factory Method example we have an interface ({@link Blacksmith}) with a method for
613
* creating objects ({@link Blacksmith#manufactureWeapon}). The concrete subclasses
714
* ({@link OrcBlacksmith}, {@link ElfBlacksmith}) then override the method to produce
815
* objects of their liking.

0 commit comments

Comments
 (0)