Package network.oxalis.commons.settings
Class SettingsBuilder<T>
- java.lang.Object
-
- network.oxalis.commons.settings.SettingsBuilder<T>
-
- All Implemented Interfaces:
com.google.inject.Provider<Settings<T>>,javax.inject.Provider<Settings<T>>
public class SettingsBuilder<T> extends Object implements com.google.inject.Provider<Settings<T>>
Binds the parameterized configuration values described in annotations on enums to the configuration values found in the supplied type safe config.- Since:
- 4.0.0
- Author:
- erlend
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Settings<T>get()voidsetConfig(com.typesafe.config.Config config)static <T> SettingsBuilder<T>with(com.google.inject.Binder binder, Class<T> cls)Binds the annotations of the supplied configuration enum as guice names with the values obtained from typesafe config.
-
-
-
Method Detail
-
with
public static <T> SettingsBuilder<T> with(com.google.inject.Binder binder, Class<T> cls)
Binds the annotations of the supplied configuration enum as guice names with the values obtained from typesafe config.- Type Parameters:
T- the type literal of the enum for instancePersisterConf- Parameters:
binder- current Guice bindercls- the enum class with annotations- Returns:
- instance of SettingsBuilder
-
setConfig
@Inject public void setConfig(com.typesafe.config.Config config)
-
-