Package

breeze

config

Permalink

package config

Visibility
  1. Public
  2. All

Type Members

  1. trait ArgumentParser[T] extends AnyRef

    Permalink

    ArgumentParsers are used by Configuration objects to process special arguments.

    ArgumentParsers are used by Configuration objects to process special arguments. You can call ArgumentParser.addArgumentParser() to register a new one. By default, we have one for all primitives, their java boxed variants, strings, and Files.

  2. class CannotParseException extends Exception

    Permalink

    The exception thrown in case something goes wrong in Configuration

  3. trait Configuration extends AnyRef

    Permalink

    Configuration provides a way to read in parameters from an underlying representation, usually a properties file.

    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.

  4. abstract class ConfigurationException extends Exception

    Permalink

    The exception thrown in case something goes wrong in Configuration

  5. class Help extends Annotation with Annotation with ClassfileAnnotation

    Permalink
  6. class NoParameterException extends ConfigurationException

    Permalink

    The exception thrown for a missing property in Configuration

  7. class UnusedOptionsException[T] extends ConfigurationException

    Permalink

Value Members

  1. object ArgumentParser

    Permalink
  2. object CommandLineParser

    Permalink

    Simple CommandLine Parser that turns options into Configurations

    Simple CommandLine Parser that turns options into Configurations

    -option [value] (has property option -> value, "true" if no value) -option arg1 +option arg2 (has property option -> arg1,arg2 ++file read file as a java properties file. overwrites any other options. No appending. ++ file read file as a java properties file

  3. object Configuration

    Permalink
  4. object GenerateHelp

    Permalink

    Generates a Help message from a case class.

    Generates a Help message from a case class. If a constructor parameter has a "Help" annotation present, it will display that along with basic type information.

Ungrouped