Jump to content

Factory method

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by RedWolf (talk | contribs) at 17:20, 23 May 2004 (wikify). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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