Skip to content

Instantly share code, notes, and snippets.

@leogrim
Last active May 2, 2016 17:40
Show Gist options
  • Save leogrim/5ff7bacef17f8f65bc1cd5823354e23b to your computer and use it in GitHub Desktop.
Save leogrim/5ff7bacef17f8f65bc1cd5823354e23b to your computer and use it in GitHub Desktop.
class ServiceAModule extends ScalaModule {
def configure() {
bind[ClassC].to[CommonImplementation]
bind[ClassA].to[ImplementationA]
}
def classDProviderForServiceA: ClassD = serviceAInstanceOfClassD
}
class ServiceBModule extends ScalaModule {
def configure() {
bind[ClassC].to[CommonImplementation]
bind[ClassB].to[ImplementationB]
}
def classDProviderForServiceB: ClassD = serviceBInstanceOfClassD
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment