breeze.config

Configuration

trait Configuration extends AnyRef

Configuration provides a way to read in parameters from an underlying representation, usually a properties file. It automatically parses primitives, strings, and Files, and has the ability to handle more complex types via reflection and byte code munging. For instance, we can read in the following:

case class Foo(bool: Boolean, bar: String, path: File, logLevel: Int = 3)

with the following command: config.readIn[Foo]("foo") and properties file: foo.bool = true bar = test foo.path = /home/dlwh/

logLevel will automatically be inferred from its default. Nested classes are also supported. By default, Configuration will search for a property using a layered approach: foo.baz.bar, then baz.bar, then bar, following by a default if it's provided.

Some amount of type inference of type arguments is performed, but it's by no means perfect. If something doesn't work that you'd like to work, ask on the mailing list.

Subclassing is also supported. If you readIn[T]("foo"), and the property foo is the name of a subclass of T (fully qualified), then the subclass will be read instead.

Self Type
Configuration
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Configuration
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def allPropertyNames: Set[String]

  2. abstract def getProperty(property: String): Option[String]

    Get a raw property without any processing.

    Get a raw property without any processing. Returns None if it's not present.

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def backoff(that: Configuration): Configuration

    Use properties from that if not found in this

  8. def clone(): AnyRef

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

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

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

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

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

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

    Definition Classes
    AnyRef
  18. final def readIn[T](prefix: String = "", enforceFullCoverage: Boolean = false)(implicit arg0: Manifest[T]): T

    Reads in an object, but throw an exception if not found.

  19. final def readIn[T](prefix: String, default: ⇒ T)(implicit arg0: Manifest[T]): T

    Read in a T using a prefix, backing off to default, if necessary.

  20. final def readInTouched[T](prefix: String, default: ⇒ T)(implicit arg0: Manifest[T]): (T, Set[String])

    Read in a T using a prefix, backing off to default, if necessary.

  21. final def readInTouched[T](prefix: String)(implicit arg0: Manifest[T]): (T, Set[String])

    Reads in an object, and return the set of property keys we touched

  22. final def readOpt[T](prefix: String = "")(implicit arg0: Manifest[T]): Option[T]

    Read in an object, boxing it if necessary.

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def toCommandLineString: String

  25. def toPropertiesString: String

  26. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped