public class LocatedConfiguration implements Configuration
Configuration.DefaultImpls| Constructor and Description |
|---|
LocatedConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Key<?> key) |
<T> T |
get(Key<? extends T> key)
Look up a property value identified by key, or throw
class Misconfiguration if there is no definition of the
property. Implementations can override missingPropertyMessage to provide a more detailed error message
for the exception. |
Location |
getLocation() |
<T> T |
getOrElse(Key<? extends T> key,
T p)
Look up a property value identified by key, or return default with the key if there is no definition of the
property.
|
<T> T |
getOrElse(Key<? extends T> key,
kotlin.jvm.functions.Function1<? super com.natpryce.konfig.Key<?extendsT>,? extends T> p)
Look up a property value identified by key, or call default with the key if there is no definition of the
property.
|
PropertyLocation |
location(Key<?> key) |
java.util.List<com.natpryce.konfig.PropertyLocation> |
searchPath(Key<?> key)
An implementation that works for a
interface Configuration that is loaded from single source, and must be
overridden if the interface Configuration searches in multiple sources. |
contains, get, getOrElse, getOrElse, getOrNull, list, searchPathpublic Location getLocation()
public java.util.List<com.natpryce.konfig.PropertyLocation> searchPath(Key<?> key)
An implementation that works for a interface Configuration that is loaded from single source, and must be
overridden if the interface Configuration searches in multiple sources.
interface Configuration,
interface Configurationpublic PropertyLocation location(Key<?> key)
public <T> T get(Key<? extends T> key)
Look up a property value identified by key, or throw class Misconfiguration if there is no definition of the
property. Implementations can override missingPropertyMessage to provide a more detailed error message
for the exception.
class Misconfigurationpublic <T> T getOrElse(Key<? extends T> key, T p)
Look up a property value identified by key, or return default with the key if there is no definition of the property.
public <T> T getOrElse(Key<? extends T> key, kotlin.jvm.functions.Function1<? super com.natpryce.konfig.Key<?extendsT>,? extends T> p)
Look up a property value identified by key, or call default with the key if there is no definition of the property.
public boolean contains(Key<?> key)