I do not think it would be a sane strategy for Guice to arbitrary
choose an injectable constructor, even if the pattern is defined
somewhere.  I am a very strong fan of Guice's explicit @Inject
behavior when multiple constructors are involved.

As far as a single constructor goes... I'm ambivalent about it.  I've
written up about 6 or so emails to respond to this thread and
discarded them all halfway through writing, because I don't really
care either way.

But multiple constructors...  @Inject is definitely necessary there.

Sam

On Wed, Oct 15, 2008 at 3:29 PM, Gili Tzabari <[EMAIL PROTECTED]> wrote:
>
>
>    JAX-RS takes the strategy of choosing the constructor with the
> greatest number of injectable objects. Guice could do the same by
> default and @Inject would be used to override it.
>
> Gili
>
> Brian Pontarelli wrote:
>>> On the plus side - think of the zillions of Java classes out there
>>> that Guice would be able to automatically inject without folks having
>>> to write their own magic AOP bytecode swizzler, get access to the
>>> code, hack it and re-release it or write custom providers.
>>>
>>
>> But every system needs at least one swizzler. Otherwise, how will you
>> guarantee maintenance for the next 20 years? ;)
>>
>> I'm coming around to this idea though. Things currently blow up at
>> runtime if you haven't written a provider and there isn't a no-arg
>> constructor. Is blowing chunks for multiple constructors any different?
>>
>> hmmmm......
>>
>> -bp
>>
>>
>> >
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to