We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2038d69 commit ed81bcfCopy full SHA for ed81bcf
3 files changed
prototype/src/main/java/com/iluwatar/App.java
@@ -1,5 +1,12 @@
1
package com.iluwatar;
2
3
+/**
4
+ *
5
+ * In Prototype we have a factory class (HeroFactoryImpl) producing
6
+ * objects by cloning existing ones. In this example the factory's
7
+ * prototype objects are given as constructor parameters.
8
9
+ */
10
public class App
11
{
12
public static void main( String[] args )
prototype/src/main/java/com/iluwatar/HeroFactory.java
@@ -1,5 +1,10 @@
+ * Interface for the factory class.
public interface HeroFactory {
Mage createMage();
prototype/src/main/java/com/iluwatar/HeroFactoryImpl.java
+ * Concrete factory class.
public class HeroFactoryImpl implements HeroFactory {
private Mage mage;
0 commit comments