You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google...@googlegroups.com
Is it possible to get the set of all types with a given binding annotation? I would need to access this set from an injector. My first thought is to load them into a multiset with a type listener, but it doesn't look like I can do any bindings from a type listener. Can I somehow make multiset bindings from a visitor? Can I add visitors from inside a module to the whole dependency hierarchy?
Thanks,
Daniel
Alen Vrečko
unread,
May 10, 2012, 12:31:19 PM5/10/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-guice
Why don't you use injector#getAllBindings()? What is the use case?
Cheers
Alen
Daniel Murphy
unread,
May 10, 2012, 2:27:28 PM5/10/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google...@googlegroups.com
That would probably work. I'm using this in a custom module (very similar to the RealMultibinder module), and I'll be requesting these objects when my @Inject @Toolable initialize(Injector) method is called. I'm assuming the getDependencies() -> Injector followed by getDependencies() -> read dependencies pattern works for any provider with HasDependencies?