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
Original issue reported on code.google.com by
wyric...@gmail.com
on 28 Jan 2009 at 11:20