vendredi 13 avril 2018

Design pattern: Factorу that creates one object

There is a standalone Java application. In it there is a factory method which is called once and creates only one object (if it is possible to create it). I have two questions - which pattern is better for this? And secondly- is it correct to store the object that creates the factory in the factory itself in this case?

Aucun commentaire:

Enregistrer un commentaire