Factory method
|
A Factory method is a static method of a class that constructs another instance of an object. It is used when the class knows more about the object than the client. Often in classes that have factory methods, are those who have private constructor(s) and other initialisation occurs before the instance is produced.
See also: Factory method pattern