[EMAIL PROTECTED] wrote:
> On Nov 21, 5:07 pm, Gili <[EMAIL PROTECTED]> wrote:
>> What is "Injector binding"?
> That's defined here:
> http://google-guice.googlecode.com/svn/trunk/latest-javadoc/com/google/inject/Binding.html

        I assume that Injector.getBinding(Key).acceptScopingVisitor() is the 
way to use BindingScopingVisitor on injector bindings, but it isn't 
clear how to use it against module bindings.

        I would like to suggest the following:

- visitEagerSingleton() should link to 
ScopedBindingBuilder.asEagerSingleton()

- visitNoScoping() "An unscoped binding will behave like a scoped one 
when it is linked to a scoped binding." should probably reads "[...] 
linked to a scoped *target*". I think "target" is easier to understand 
in this context (too many uses of the word binding). Alternatively, your 
other explanation is also much clearer: "Suppose you bind Foo to 
FooImpl. If Foo is unscoped and FooImpl is a singleton, then Foo is 
effectively a singleton."

- visitScopeAnnotation(): It isn't clear when this method is even 
invoked. I tried invoking Binder.bindScope() and in(scopedAnnotation) 
and neither of these triggered this method. visitScope() was triggered 
instead. Remember, I am using the Guice-2.0 snapshot, not trunk.

> I took another pass on the scopes wiki. Hopefully it makes it more
> obvious what you'll need to do to define a custom scope:
> http://code.google.com/p/google-guice/wiki/Scopes

Thanks!

Gili

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