Converts the configuration path to the given type.
Converts the configuration path to the given type. If the requested type is not supported, an exception is thrown. Override this method to support custom types.
Method to fetch a configuration key that may or may not be present.
Method to fetch a configuration key that may or may not be present.
Method to allow subclasses to override how errors are handled, e.g.
Method to allow subclasses to override how errors are handled, e.g. by logging or throwing different exceptions.
Method that can be overridden to receive a call each time a configuration path is requested.
Method that can be overridden to receive a call each time a configuration path is requested.
Trait that provides useful methods for resolving all kinds of things in configuration. Uses Config to retrieve configuration values in a type-safe way.
The
config
method must be implemented by a subclass, giving the Config from which to retrieve configuration values.Overriding the
keyRequested
method allows a call to be received each time a configuration path is requested.Overriding the
handle
method allows a subclass to determine how errors are handled.Extending the
asType
method allows a subclass to support additional (possibly custom) types.The
fetch
method is used to retrieve configuration values.Retrieve a value at a given path: