I now have a generic class cars, for example, business requirements is to dynamic expand on this class, I if I'm a 4 s shop, I sell byd, tesla, I need a generic class to be inherited the two car, if I add a xiao peng, so I will need to be done on the basis of the source code to add Xpeng extends cars, now is this situation, is there any way to dynamically add without moving source once and for all?
CodePudding user response:
Using the configuration file, can be decomposed