Package network.oxalis.ng.commons.guice
Class GuiceModuleLoader
- java.lang.Object
-
- com.google.inject.AbstractModule
-
- network.oxalis.ng.commons.guice.GuiceModuleLoader
-
- All Implemented Interfaces:
com.google.inject.Module
public class GuiceModuleLoader extends com.google.inject.AbstractModuleImplementation for loading of Guice modules on same principles discussed on StackOverflow, however this implementation uses Typesafe Config instead of Java ServiceLoader to allow for further configuration than only "detected".- Author:
- erlend
-
-
Constructor Summary
Constructors Constructor Description GuiceModuleLoader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigure()protected static <T,R>
Predicate<T>distinctByKey(Function<? super T,R> function)protected static List<com.google.inject.Module>getModules()static com.google.inject.Injectorinitiate(com.google.inject.Module... modules)protected static com.google.inject.Moduleload(com.typesafe.config.Config config)protected static com.google.inject.ModuleloadModule(String className)-
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
-
-
-
Method Detail
-
initiate
public static com.google.inject.Injector initiate(com.google.inject.Module... modules)
-
configure
protected void configure()
- Overrides:
configurein classcom.google.inject.AbstractModule
-
getModules
protected static List<com.google.inject.Module> getModules()
-
load
protected static com.google.inject.Module load(com.typesafe.config.Config config)
-
loadModule
protected static com.google.inject.Module loadModule(String className)
-
-