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 need to create new instances of those things; perhaps you want assisted inject factories? Or you can sometimes get away with injecting a Provider<Test..Helper> if you don't want your bindings to be singletons (and you feel like assisted inject is overkill). Nate On Fri, Dec 27, 2013 at 7:57 AM, vinay krishna <[email protected]>wrote: > 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 factory class :- > > public DeliverableHelper getWorkflowHelper(DeliverableType > deliverableType) throws DfException { > DeliverableHelper workflowClass = null; > switch (deliverableType) { > > case TCP: > workflowClass = new TestInstanceHelper(); > > break; > case TET: > workflowClass = new TestElementHelper(); > break; > case ASSET: > workflowClass = new AssetHelper(); > break; > default: > throw new DfException("Deliverable type is not valid"); > > } > return workflowClass; > } > > How can i fit all these using google guice binding. > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/google-guice. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-guice. For more options, visit https://groups.google.com/groups/opt_out.
