how to wire inheritance in Java config ?
hi,
Current Design-->
BaseManager extends Manager extends Type1DataStoreImpl implements DataStoreInterface
BaseManager is referenced everywhere in the application as
for (DataStoreInterface o:BaseManager.getAllObjects()){};
Modification-->
I have Type2DataStoreImpl implements DataStoreInterface
I want to make minimum changes to the application ie BaseManager & Manager should not be replaced by new classes.
Is there a way I can dynamically plug Type2DataStoreImpl as parent of Manager ( .properties file decides its type1 or type2 implementation) ?
New Design
BaseManager extends Manager extends Type1DataStoreImpl or Type2DataStoreImpl (depending on config file) implements DataStoreInterface
Thanks in advance.