Hi,
I am going through a Refactoring site reading
Classes with Factory. From what I understand, here is the code for it as per the diagram, the intent being "Make the class constructors non-public and let clients create instances of them using a Factory."
I am a little confused with this. Normally, we have a factory class which returns instances confirming to an interface. In this case the interface is a class and the class itself has factory methods , forBoolean() and forString(). Secondly the concrete classes extends from the generic class - AttributeDescriptors restricting them from inheritng any other behavior. I am not really sure about the benefits of this approach, if at all I have coded correctly with respect to the
diagram Regards,
Nikhil