ArgumentParsers are used by Configuration objects to process special arguments.
The exception thrown in case something goes wrong in Configuration
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.
The exception thrown in case something goes wrong in Configuration
The exception thrown for a missing property in Configuration
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
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.
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.