On Mon, May 14, 2012 at 1:02 AM, Lucas Mansbridge
<
lucasma...@gmail.com> wrote:
> I only wish to pass simple arguments like int and String. Should I then
> create a container class for these as a singleton and inject it? Or is there
> a simpler way?
Assisted inject is the way to go (as Christian already pointed out).
Another simpler way is to use a simple method setMyInt(int i) and call
it after the provider.get().
Pro:
- Simpler than assisted inject
Con:
- More error prone as you can forget it and then your presenter does not work...
Cheers,
ra
>
> On 13/05/2012, at 11:27 AM, Christian Goudreau
> <
goudreau....@gmail.com> wrote:
>
> You will have to use Gin assited injection feature to do that.
>
> Cheers,
>
> On Thu, May 10, 2012 at 3:42 AM, Lucas Mansbridge
> <
lucasma...@gmail.com> wrote:
>>
>> Hi, I have a PresenterWidget that I instantiate by wrapping in a Provider
>> and calling get(). Is there a way I can pass it constructor parameters? Or
>> can I only pass it objects after it's instantiated?
>>
>> Thanks,
>>
>> Lucas
>
>
>
>
> --
> Christian Goudreau
>
www.arcbees.com
>
--
inc:
http://ars-machina.raphaelbauer.com
tech:
http://ars-codia.raphaelbauer.com
web:
http://raphaelbauer.com