I\'m familiar with the idea and benefits of a static factory method, as described in Joshua Bloch\'s Effective Java:
Use javax.swing.BorderFactory
as an example of all three points.
This class is used to make borders for swing objects. These border objects can be easily re-used, and this factory method allows for this. Here is the javadoc. This factory is a great example of all three points:
createEmptyBorder()
and createEtchedBorder()
.Border
itself is actually an interface, so all objects created through this factory are actually classes which implement this interface.