On Nov 24, 11:14 am, Gili Tzabari <[EMAIL PROTECTED]> wrote: > Wouldn't one simply use ElementVisitor.visitScopeBinding() for Module > Bindings instead? It's simpler and contains more information. If so, you > might want to consider removing > BindingScopingVisitor.visitScopeAnnotation() altogether.
They serve different purposes. The scope of this binding triggers BindingScopingVisitor.visitScopeAnnotation(): bind(Foo.class).to(RealFoo.class).in(BatchScoped.class); This tells Guice that the binding for Foo should be scoped using @BatchScope. This bind scope statement triggers ElementVisitor.visitScopeBinding(): bindScope(BatchScoped.class, new MyBatchScope()); This tells Guice that @BatchScope is implemented using a particular implementation. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
