Does Class.newInstance() follow the “Abstract factory” design pattern?
问题 I have started reading Joshua Bloch's "Effective Java" (second edition). While reading item 2 ( Consider a builder when faced with many constructor parameters ), there is a particular statement that the author makes w.r.t the Class.newInstance() method. Specifically, the author says that The traditional Abstract Factory implementation in Java has been the "Class" object, with the "newInstance" method playing the part of the "build" method. This part has me confused a little bit - my