A full configuration set.
The underlying implementation is provided by https://github.com/typesafehub/config.
Value parameters
- underlying
-
the underlying Config implementation
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Returns every path as a set of key to value pairs, by recursively iterating through the config objects.
Returns every path as a set of key to value pairs, by recursively iterating through the config objects.
Attributes
Get the config at the given path.
Get the config at the given path.
Attributes
Get the config at the given path and validate against a set of valid values.
Get the config at the given path and validate against a set of valid values.
Attributes
Get a deprecated configuration item.
Get a deprecated configuration item.
If the deprecated configuration item is defined, it will be returned, and a warning will be logged.
Otherwise, the configuration from path will be looked up.
Attributes
Get a deprecated configuration.
Get a deprecated configuration.
If the deprecated configuration is defined, it will be returned, falling back to the new configuration, and a warning will be logged.
Otherwise, the configuration from path will be looked up and used as is.
Attributes
Retrieves a configuration value as Milliseconds
.
Retrieves a configuration value as Milliseconds
.
For example:
val configuration = Configuration.load()
val timeout = configuration.getMillis("engine.timeout")
The configuration must be provided as:
engine.timeout = 1 second
Attributes
Retrieves a configuration value as Milliseconds
.
Retrieves a configuration value as Milliseconds
.
For example:
val configuration = Configuration.load()
val timeout = configuration.getNanos("engine.timeout")
The configuration must be provided as:
engine.timeout = 1 second
Attributes
Get a value that may either not exist or be null. Note that this is not generally considered idiomatic Config usage. Instead you should define all config keys in a reference.conf file.
Get a value that may either not exist or be null. Note that this is not generally considered idiomatic Config usage. Instead you should define all config keys in a reference.conf file.
Attributes
Get a prototyped map of objects.
Get a prototyped map of objects.
Each value in the map will fallback to the object loaded from prototype.$path.
Attributes
Get a prototyped sequence of objects.
Get a prototyped sequence of objects.
Each object in the sequence will fallback to the object loaded from prototype.$path.
Attributes
Creates a configuration error for this configuration.
Creates a configuration error for this configuration.
For example:
val configuration = Configuration.load()
throw configuration.globalError("Missing configuration key: [yop.url]")
Value parameters
- e
-
the related exception
- message
-
the error message
Attributes
- Returns
-
a configuration exception
Check if the given path exists.
Check if the given path exists.
Attributes
Returns available keys.
Returns available keys.
For example:
val configuration = Configuration.load()
val keys = configuration.keys
Attributes
- Returns
-
the set of keys available in this configuration
Creates a configuration error for a specific configuration key.
Creates a configuration error for a specific configuration key.
For example:
val configuration = Configuration.load()
throw configuration.reportError("engine.connectionUrl", "Cannot connect!")
Value parameters
- e
-
the related exception
- message
-
the error message
- path
-
the configuration key, related to this error
Attributes
- Returns
-
a configuration exception
Returns sub-keys.
Returns sub-keys.
For example:
val configuration = Configuration.load()
val subKeys = configuration.subKeys
Attributes
- Returns
-
the set of direct sub-keys available in this configuration
Merge two configurations. The second configuration will act as the fallback for the first configuration.
Merge two configurations. The second configuration will act as the fallback for the first configuration.
Attributes
Deprecated methods
Merge two configurations. The second configuration overrides the first configuration. This is the opposite direction of Config
's withFallback
method.
Merge two configurations. The second configuration overrides the first configuration. This is the opposite direction of Config
's withFallback
method.
Attributes
- Deprecated
-
[Since version 2.8.0]