Search in sources :

Example 1 with EmptyConfigContext

use of com.nexblocks.authguard.config.EmptyConfigContext in project AuthGuard by AuthGuard.

the class ConfigBinder method configure.

@Override
protected void configure() {
    configContext.subContexts().forEach(subContext -> {
        bind(ConfigContext.class).annotatedWith(Names.named(subContext)).toInstance(configContext.getSubContext(subContext));
    });
    // if nothing was
    bind(ConfigContext.class).annotatedWith(Named.class).toInstance(new EmptyConfigContext());
    bind(ConfigContext.class).toInstance(configContext);
}
Also used : Named(com.google.inject.name.Named) EmptyConfigContext(com.nexblocks.authguard.config.EmptyConfigContext) EmptyConfigContext(com.nexblocks.authguard.config.EmptyConfigContext) ConfigContext(com.nexblocks.authguard.config.ConfigContext)

Aggregations

Named (com.google.inject.name.Named)1 ConfigContext (com.nexblocks.authguard.config.ConfigContext)1 EmptyConfigContext (com.nexblocks.authguard.config.EmptyConfigContext)1