You can use the bind().toConstructor() API to achieve this. On Tue, Aug 31, 2010 at 3:38 AM, Paulo Silveira <[email protected]>wrote:
> Hello > > I would like to make @Inject optional if there is a single > constructor. In this case, the single constructor should be used. Is > there an easy way to implement this feature? > > Is there any way to extend these injection points? > http://code.google.com/p/google-guice/wiki/InjectionPoints > > Or a way to programmatically configure which constructor of each class > should be used for injection. > > thanks! > > -- > Paulo Silveira > www.caelum.com.br > > -- > 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]<google-guice%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-guice?hl=en. > > -- 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.
