mercredi 9 mars 2022

How can I write an interface for a place where I obviously can have abstact class but I need an interface?

I have an abstract class that is extended by a final class with very closed implementation(private fields, methods, security oriented). There is a switch-case that depending on some input chooses which constructor to use. I want to get rid of the extended class but leave some interface for people to plugin their own implementation. Any suggestions how to approach this design/OOP problem?

Aucun commentaire:

Enregistrer un commentaire