I'm implementing some kind of mega-factory for some design reason I prefer, and in this scope, I would like to "force" the use of the factory, including for the Data class. So I'm thinking about setting the Data() constructor visibility to package-private. I haven't read anything about the requirement of the constructor Data() being public.
So my questions is: did any of the implementors of the singleton pattern for Data set the default constructor to anything else than public and still scored a perfect for that data access part?
I marked the default constructor (which is the only constructor I have in Data class) even as private. This was of course needed for a correct implementation of singleton pattern. So i guess package-private won't be a problem too.