package singleton; public class SomeFactory { static private SomeFactory _instance; protected SomeFactory() { // .... } public static SomeFactory instance() { if (_instance == null) { _instance = new SomeFactory(); } return _instance; } // Factory methods, producing products... // ..... } // ..... } // ..... }