org.ekrich.config.ConfigValue.scala Maven / Gradle / Ivy
Show all versions of sconfig_sjs1.0-RC2_2.13 Show documentation
/**
* Copyright (C) 2011-2012 Typesafe Inc.
*/
package org.ekrich.config
/**
* An immutable value, following the JSON type
* schema.
*
*
* Because this object is immutable, it is safe to use from multiple threads and
* there's no need for "defensive copies."
*
*
* Do not implement interface {@code ConfigValue}; it should only be
* implemented by the config library. Arbitrary implementations will not work
* because the library internals assume a specific concrete implementation.
* Also, this interface is likely to grow new methods over time, so third-party
* implementations will break.
*/
trait ConfigValue extends ConfigMergeable {
/**
* The origin of the value (file, line number, etc.), for debugging and
* error messages.
*
* @return where the value came from
*/
def origin: ConfigOrigin
/**
* The {@link ConfigValueType} of the value; matches the JSON type schema.
*
* @return value's type
*/
def valueType: ConfigValueType
/**
* Returns the value as a plain Java boxed value, that is, a {@code String},
* {@code Number}, {@code Boolean}, {@code Map},
* {@code List