case class Configuration(underlying: Config) extends Product with Serializable
A full configuration set.
The underlying implementation is provided by https://github.com/typesafehub/config.
- underlying
the underlying Config implementation
- Source
- Configuration.scala
- Alphabetic
- By Inheritance
- Configuration
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Configuration(underlying: Config)
- underlying
the underlying Config implementation
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def entrySet: Set[(String, ConfigValue)]
Returns every path as a set of key to value pairs, by recursively iterating through the config objects.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get[A](path: String)(implicit loader: ConfigLoader[A]): A
Get the config at the given path.
- def getAndValidate[A](path: String, values: Set[A])(implicit loader: ConfigLoader[A]): A
Get the config at the given path and validate against a set of valid values.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDeprecated[A](path: String, deprecatedPaths: String*)(implicit arg0: ConfigLoader[A]): A
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.
- def getDeprecatedWithFallback(path: String, deprecated: String, parent: String = ""): Configuration
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.
- def getMillis(path: String): Long
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
- def getNanos(path: String): Long
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
- def getOptional[A](path: String)(implicit loader: ConfigLoader[A]): Option[A]
Get a value that may either not exist or be null.
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.
- def getPrototypedMap(path: String, prototypePath: String = "prototype.$path"): Map[String, Configuration]
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.
- def getPrototypedSeq(path: String, prototypePath: String = "prototype.$path"): Seq[Configuration]
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.
- def globalError(message: String, e: Option[Throwable] = None): PlayException
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]")
- message
the error message
- e
the related exception
- returns
a configuration exception
- def has(path: String): Boolean
Check if the given path exists.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def keys: Set[String]
Returns available keys.
Returns available keys.
For example:
val configuration = Configuration.load() val keys = configuration.keys
- returns
the set of keys available in this configuration
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def reportError(path: String, message: String, e: Option[Throwable] = None): PlayException
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!")
- path
the configuration key, related to this error
- message
the error message
- e
the related exception
- returns
a configuration exception
- def subKeys: Set[String]
Returns sub-keys.
Returns sub-keys.
For example:
val configuration = Configuration.load() val subKeys = configuration.subKeys
- returns
the set of direct sub-keys available in this configuration
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val underlying: Config
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withFallback(other: Configuration): Configuration
Merge two configurations.
Merge two configurations. The second configuration will act as the fallback for the first configuration.
Deprecated Value Members
- def ++(other: Configuration): Configuration
Merge two configurations.
Merge two configurations. The second configuration overrides the first configuration. This is the opposite direction of
Config
'swithFallback
method.- Annotations
- @deprecated
- Deprecated
(Since version 2.8.0) Use withFallback instead