I need to do a lot of customization to a UI class A by calling its setter/addProperty/addListener methods during initialization. I do not want to do these every time I create an instance of customized A.
Right now I have methods to do initialization in every class who need to use customized A, but it just looks very messy. Should I consider extending A just to add these initialization during construction or it is better to make some kind of factory class? I am not a fan of factory classes because it is not neat to use them. Please Help.
Aucun commentaire:
Enregistrer un commentaire