Also, in Guice2, your Module can have an @Provides method which could
call your factory, removing the need for a separate class for a
Provider.

-Dave

On Thu, Apr 23, 2009 at 11:12 AM, David Stenglein
<[email protected]> wrote:
> If the external application is not going to use Guice, then that means
> your Provider is just a factory with no other dependency on Guice. Why
> not expose that and then subclass it for use with Guice in a separate
> jar?
>
> -Dave
>
> On Thu, Apr 23, 2009 at 11:00 AM, Adrian Cole <[email protected]> wrote:
>> Perhaps...  Although if my api interface extends a guice one, I may as well
>> have used the guice one, right?  The user would still need guice libraries
>> loaded or the IDE would turn somewhat red.  Other alternates might include
>> putting the guice Provider interface into my api jar.  However, I'd like to
>> avoid exposing guice in my external apis.
>> Thanks for the response...  I do appreciate it.  Do you have any other
>> ideas?
>> -Adrian
>>
>> On Thu, Apr 23, 2009 at 4:45 PM, Adam Ruggles <[email protected]> wrote:
>>>
>>> Couldn't you make your provider interface extend the Guice one?
>>>
>>> On Thu, Apr 23, 2009 at 7:07 AM, AdrianCole <[email protected]> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I'd like to minimize the compile-time dependency of guice on an
>>>> application who wants to use my guiced component.
>>>>
>>>> I'd like to provide a method:
>>>>
>>>> Provider<Foo> void getFooProvider()
>>>>
>>>> Difference is that I'd like to use the interface com.foo.Provider as
>>>> opposed to the guice one.
>>>>
>>>> Is there a way to make this happen?
>>>>
>>>> Thanks,
>>>> -Adrian
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> >>
>>
>

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