jeudi 20 septembre 2018

Lazy Construction of a Component

I want to create an Object with this requirement :

  1. The Object should be unique, one instance
  2. The Object components (fields) will be initialised in different parts of my code, not just in one place.

How can I Implement this ? Using Singleton or Builder or another design pattern.

Thanks

Aucun commentaire:

Enregistrer un commentaire