T
- option type (actually not used in the implementation but showing here connection between type
declaration and option value)public interface Option<T>
GuiceyOptions
. Usage within enums does not allow
using generics for option values checking, so option type set explicitly and used internally to validate
option type on option value set.
Options could be set only on application (root) level using
GuiceBundle.Builder.option(Enum, Object)
method, so all options are always set
before bundles processing.
Option may provide default value (useful for most cases, especially boolean options). Option may not be set to null (protected by implementation).
Option may be accessed in bundle using
GuiceyBootstrap.option(Enum)
method or using
Options
guice bean. Installers could access options using
WithOptions
interface.
Option reads and writes are tracked in order to detect useless and default value options. All tracked information
is available through OptionsInfo
guice bean.
Modifier and Type | Method and Description |
---|---|
T |
getDefaultValue() |
java.lang.Class<T> |
getType() |