I have defined a superclass :
public abstract class DeliverableHelper
There are three classes which is extending DeliverableHelper :-
TestInstanceHelper,AssetHelper and TestElementHelper
I am using a factory class to resolve which class will be called at
runtime :-
below is the code of the
I don't really understand what you're asking.
Perhaps, you don't realize that Guice does not require you to bind to an
interface. For example, why can't you bind each class?
bind(TestInstanceHelper.class).asEagerSingleton();
...
Then inject each instance into your DeliverableHelper?
Or if you
If you’re using new for these, no point in using Guice. If not, something
like that
@Injectprivate TestInstanceHelper tih;
@Injectprivate TestElementHelper teh;
// switch and assign
The fact they are subtypes of a common class is irrelevant.
Also, multibinders might help you do something more