public class ConfigurationProperties
extends LocatedConfiguration
Configuration stored in a Properties object.
| Modifier and Type | Class and Description |
|---|---|
static class |
ConfigurationProperties.Companion |
Configuration.DefaultImpls| Modifier and Type | Field and Description |
|---|---|
static ConfigurationProperties.Companion |
Companion |
| Constructor and Description |
|---|
ConfigurationProperties(java.util.Properties properties,
Location location)
Configuration stored in a Properties object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Key<?> key) |
static NonExistentClass |
fromFile(java.io.File file)
Load from file
|
static ConfigurationProperties |
fromResource(java.lang.Class<?> relativeToClass,
java.lang.String resourceName)
Load from resources relative to a class
|
static ConfigurationProperties |
fromResource(java.lang.String resourceName)
Load from resource within the system classloader.
|
Location |
getLocation() |
<T> T |
getOrNull(Key<? extends T> key)
Look up a property value identified by key, or return
null if there is no definition of the
property. |
java.util.List<kotlin.Pair> |
list() |
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. |
static ConfigurationProperties |
systemProperties()
Returns the system properties as a Config object.
|
contains, get, getLocation, getOrElse, getOrElse, location, searchPathcontains, get, getOrElse, getOrElse, getOrNull, list, searchPathpublic static ConfigurationProperties.Companion Companion
public ConfigurationProperties(java.util.Properties properties,
Location location)
Configuration stored in a Properties object.
public <T> T getOrNull(Key<? extends T> key)
Look up a property value identified by key, or return null if there is no definition of the
property.
public boolean contains(Key<?> key)
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 java.util.List<kotlin.Pair> list()
public Location getLocation()
public static ConfigurationProperties systemProperties()
Returns the system properties as a Config object.
public static ConfigurationProperties fromResource(java.lang.Class<?> relativeToClass, java.lang.String resourceName)
Load from resources relative to a class
public static ConfigurationProperties fromResource(java.lang.String resourceName)
Load from resource within the system classloader.
public static NonExistentClass fromFile(java.io.File file)
Load from file