-
Feb 23rd, 2009, 12:17 PM
#1
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.
-
Feb 23rd, 2009, 12:18 PM
#2
Pls recommend other solutions as well.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules