Created
September 12, 2016 09:49
-
-
Save rethab/eae69d672223c165eacd3b2d175c6a2c to your computer and use it in GitHub Desktop.
get instance by named annotation from guice injector with the play framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import play.api.inject.{QualifierInstance, BindingKey} | |
import com.google.inject.name.Names | |
val injector = ??? | |
injector.instanceOf(BindingKey(classOf[MyType], Some(QualifierInstance(Names.named("my-thing"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment