alexy / optional
- Source
- Commits
- Network (1)
- Downloads (1)
- Wiki (1)
- Graphs
-
Branch:
master
optional /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
LICENSE | ||
| |
README | Tue Aug 11 03:44:28 -0700 2009 | |
| |
lib/ | ||
| |
mkCommand | Fri Aug 07 10:05:32 -0700 2009 | |
| |
pom.xml | ||
| |
project/ | Fri Aug 07 10:05:32 -0700 2009 | |
| |
src/ |
README
optional is a command line option parser and library.
YOU WRITE:
object MyAwesomeCommandLineTool extends optional.Application {
// for instance...
def main(count: Option[Int], file: Option[java.io.File], arg1: String) {
[...]
}
}
THEN YOU DO:
scala MyAwesomeCommandLineTool --count 5 quux
AND YOUR MAIN METHOD WILL BE INVOKED SUCH THAT:
count = Some(5)
file = None
arg1 = quux
See the example programs for many more features.
HOW IT WORKS:
Reflection, man.
CREDITS:
Idea and prototype implementation: DRMacIver.
Fleshing out and awesomification: paulp.

