Andy
unread,Apr 5, 2011, 7:55:59 PM4/5/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
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
Say in my Injector I have a PrivateModule (call it A), and A has
installed in it a PrivateModule (call it B).
Lets say in B, I call expose(Foo.class), my assumption (I'm new) is
that the binding for Foo.class is exposed to the entire Injector.
If I am wrong, I might be misinterpreting my error messages, and
disregard the rest of this.
Otherwise, Can I expose B's binding for Foo.class in a way that it
would only be available to its parent, or rather can I install A in a
way that the "exposed" bindings for B are not exposed in the root
Injector?
If this is currently not available, is it atleast possible? Could it
be added as an enhancement? Would it be a valuable enhancement?
The situation that provokes this question is, in my root Injector I
want to install a different PrivateModule(call it C), and C has it's
own exposed binding for Foo.class. The exposed binding in module B
causes a CreationException.
Perhaps my entire approach is flawed? I'm just trying to reuse
modules, maybe I just need to build modules to meet specific
situations? Thanks for your responses!