uk.co.bigbeeconsultants.bconfig

Config

object Config extends Serializable

Provides the factory methods for constructing instances from various sources. The sources are parsed and string interpolations are resolved. A 'daisy-chain' cascade of successive configurations is possible. This is where the resultant set of keys is the set union of those in this configuration and those in the fallback's. For every overlapping key, the fallback's value is overridden by this configuration, which takes precedence.

When interpolating strings, all the keys known at the point of the interpolation are available, including those only defined in the fallback. This is done only once on each configuration, when it is loaded. Therefore, if a configuration is later used as a fallback for another, its interpolations do not get re-evaluated when the later configuration is loaded. This minor limitation allows considerable benefit in that the memory footprint and processing effort are both low; the converse of evaluating interpolations on the fly would be that processing effort would be higher, or about twice as much memory would be needed, or both.

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Config
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. val Empty: Config

    The standard empty instance.

  5. def apply(parser: Parser, requiredKeys: Set[String]): Config

    Constructs an instance using the parser supplied and with a specified set of required keys, usually obtained from a default instance.

    Constructs an instance using the parser supplied and with a specified set of required keys, usually obtained from a default instance.

    Annotations
    @throws( classOf[ConfigException] )
  6. def apply(source: ConfigSourceJ, requiredKeys: Set[String]): Config

    Constructs an instance from an input source and with a specified set of required keys, usually obtained from a default instance.

    Constructs an instance from an input source and with a specified set of required keys, usually obtained from a default instance.

    Annotations
    @throws( classOf[ConfigException] )
  7. def apply(file: File, requiredKeys: Set[String]): Config

    Constructs an instance from a file and with a specified set of required keys, usually obtained from a default instance.

    Constructs an instance from a file and with a specified set of required keys, usually obtained from a default instance.

    Annotations
    @throws( classOf[ConfigException] )
  8. def apply(parser: Parser, fallback: Option[Config]): Config

    Constructs an instance using the parser supplied and with an optional fallback to be cascaded.

  9. def apply(source: ConfigSourceJ, fallback: Option[Config]): Config

    Constructs an instance from an input source and with an optional fallback to be cascaded.

    Constructs an instance from an input source and with an optional fallback to be cascaded.

    Annotations
    @throws( classOf[ConfigException] )
  10. def apply(file: File, fallback: Option[Config]): Config

    Constructs an instance from a file and with an optional fallback to be cascaded.

    Constructs an instance from a file and with an optional fallback to be cascaded.

    Annotations
    @throws( classOf[ConfigException] )
  11. def apply(primary: Config, fallback: Config): Config

    Constructs an instance using an existing Config with a cascaded fallback.

  12. def apply(parser: Parser, fallback: Config): Config

    Constructs an instance using the parser supplied and with a cascaded fallback.

  13. def apply(source: ConfigSourceJ, fallback: Config): Config

    Constructs an instance from an input source and with a cascaded fallback.

    Constructs an instance from an input source and with a cascaded fallback.

    Annotations
    @throws( classOf[ConfigException] )
  14. def apply(file: File, fallback: Config): Config

    Constructs an instance from a file and with a cascaded fallback.

    Constructs an instance from a file and with a cascaded fallback.

    Annotations
    @throws( classOf[ConfigException] )
  15. def apply(parser: Parser): Config

    Constructs an instance using the parser supplied.

  16. def apply(source: ConfigSourceJ): Config

    Constructs an instance from an input source.

    Constructs an instance from an input source.

    Annotations
    @throws( classOf[ConfigException] )
  17. def apply(file: File): Config

    Constructs an instance from a file.

    Constructs an instance from a file.

    Annotations
    @throws( classOf[ConfigException] )
  18. def apply(properties: Properties): Config

    Constructs an instance from properties.

  19. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  20. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  23. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def fromClasspath(resourcePath: String, requiredKeys: Set[String]): Config

    Constructs an instance from a classpath resource and with a specified set of required keys, usually obtained from a default instance.

    Constructs an instance from a classpath resource and with a specified set of required keys, usually obtained from a default instance.

    Annotations
    @throws( classOf[ConfigException] )
  25. def fromClasspath(resourcePath: String, fallback: Option[Config]): Config

    Constructs an instance from a classpath resource and with an optional fallback to be cascaded.

    Constructs an instance from a classpath resource and with an optional fallback to be cascaded.

    Annotations
    @throws( classOf[ConfigException] )
  26. def fromClasspath(resourcePath: String, fallback: Config): Config

    Constructs an instance from a classpath resource and with a cascaded fallback.

    Constructs an instance from a classpath resource and with a cascaded fallback.

    Annotations
    @throws( classOf[ConfigException] )
  27. def fromClasspath(resourcePath: String): Config

    Constructs an instance from a classpath resource.

    Constructs an instance from a classpath resource.

    Annotations
    @throws( classOf[ConfigException] )
  28. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  29. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  30. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. def toString(): String

    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. val empty: Config

    Annotations
    @deprecated
    Deprecated

    (Since version since v1.3.1) Use 'Empty' instead

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped