codingwell/scala-guice — pull request #30 by nbauernfeind (2014-10-04 22:20:21+00:00)
Title: Rewrite multibinder to enable it to behave more like Guice's implementation.

This fixes #29.

- I included a test for #29.
- Tested that deep type parameterizations are respected. (the class[T] based methods failed)
- I added a few InjectorExtensions (instance[T](annotation) and instance[T, Annotation])
- I simplified/consolidated a portion of the test code.
- I gave the multibinding-related files a consistent white-spacing, and addressed IntelliJ's style warnings.

I rewrote the `ScalaMultibinder` to work much more like Guice's `Multibinder`.
- It's now a trait with a hidden implementation RealScalaMultibinder.
- RealScalaMultibinder is a module that tricks Guice into only installing it once (by pretending to be the scala set key).
- I also filter all of the methods through three paths: TypeLiteral, TypeLiteral + Class[Annotation], and TypeLiteral + Annotation.

You may want to pull down this code and look at it in your favorite editor. I put Scala's specific methods at the top of ScalaMultibinder so that people may find the most useful things at the top of the file; however now the pull-request patch is slightly difficult to follow.