On Wed, Oct 21, 2009 at 1:27 PM, eric <[email protected]> wrote: > > Thanks for your reply, Jean-Francois, > > But really, I need to bind SimpleCommand to Executable. I actually > have two Exectuable implementations, SimpleCommand and > PipelinedCommand, both of them is instantiated by a String, which > comes from user input. There is a command engine responsible to handle > the Executable passed in. > Do you have any idea? >
Yep, create a second constructor without the @Assisted arg. Then use bind(Executable.class).toConstructor(vanillaConstructorOf(SimpleCommand.lass)); You will need to create the method vanillaConstructorOf to locate that second ctor. Dhanji. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---
