I'm curious about abstract factory pattern. From Java 8 we have default methods, does it mean that we can replace our abstract classes to interfaces? The one downside which I can see it's a case when we need non-static / final field. We can't do it interface. Could you give me some examples (except this one I listed) when old-fashion factories has more advantages?
Aucun commentaire:
Enregistrer un commentaire