class MyAppModule extends Module {
bind[Logger] to new FileLogger("/path/to/log.txt")
bind[UserService] to new UserServiceImpl
bind[UserRepository] to new DatabaseUserRepository
}
class MyAppModule extends Module {
bind[DatabaseConnection] to applicationLifecycle(new DatabaseConnection)
}
class MyAppModule extends Module {
if (useLocalService) {
bind[EmailService] to new LocalEmailService
} else {
bind[EmailService] to new RemoteEmailService
}
}