Open GoogleCodeExporter opened 9 years ago
It turns out that scoping the second binding doesn't do anything. You could
also do this to get the desired
behaviour:
bind(MyImplementation.class).in(SINGLETON);
bind(MyInterface.class).to(MyImplementation.class);
There's a few cases where this behaviour isn't what you want. For example, if
the keys are annotated:
bind(DataAccess.class).in(SINGLETON);
bind(DataAccess.class).to(SqlDataAccess.class);
bind(DataAccess.class).annotatedWith(WithPrivateCache.class).to(SqlDataAccess.class);
Regardless, although this might be a nice feature, we're stuck with the current
behaviour.
Original comment by limpbizkit
on 14 May 2008 at 3:40
Original issue reported on code.google.com by
logan.jo...@gmail.com
on 7 Feb 2008 at 5:49