1

The Spring Reference - Instantiation using an instance factory method has a couple of examples where the only constructor is private. How does Spring's IoC container instantiate an instance of the class, DefaultServiceLocator?

James
  • 2,876
  • 18
  • 72
  • 116
  • That answers it. Thanks. Those examples in the reference seem questionable though. Why not make the constructor public instead of relying on some trick of the IoC container? It seems readability would be improved as it would be clear that the class is intended to be externally instantiated. – James Feb 06 '15 at 23:39

0 Answers0