- Injector injector = Guice.createInjector(Arrays.asList(
- ObjectBinding.forClass(String.class).named("smtpHostname").is(options.smtpHostname),
- ObjectBinding.forClass(String.class).named("emailSender").is(options.emailSender),
- ObjectBinding.forClass(String.class).named("emailRecipient").is(options.emailRecipient),
- ObjectBinding.forClass(StateDirectory.class).is(StateDirectory.of(options.stateDirectory)),
- ObjectBinding.forClass(ChainDirectory.class).is(ChainDirectory.of(options.chainDirectory)),
- ObjectBinding.forClass(EmailAction.class).is(errorEmailAction)
- ));
+ Injector injector = Guice.createInjector(
+ ObjectBinding.forClass(Options.class).shallBe(options),
+ new RhynodgeModule()
+ );