frjaeger220 / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Need a LibraryModule that doesn't inherit from base environment by default #320

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When writing a java library that supplies a Module for clients to install,
we need a way to make that Module only pull in specific bindings from its
environment (maybe via a requiresBinding() call).  It also needs to retain
the functionality of PrivateModules.

In other words, we need to invent LibraryModule that specifically expose()s
things and explicitly requireBinding()s other things.  Other than that,
anything else that is bound in the LibraryModule is completely hidden and
cannot interfere with Libary users.  Also, anything bound in the containing
environment cannot interfere with the bindings in LibraryModule.

PrivateModule only goes half way.  If I have a binding for Foo.class in my
application module and in the library module (even if it's not exposed),
things blow up.

Original issue reported on code.google.com by wyric...@gmail.com on 28 Jan 2009 at 11:20

GoogleCodeExporter commented 9 years ago

Original comment by limpbizkit on 26 Apr 2009 at 9:26

GoogleCodeExporter commented 9 years ago
Any plans to implement this?  Or can this already be done?

Original comment by tavianator@gmail.com on 22 Sep 2013 at 8:17