Menu

Home

Chris DeGreef

Command-line argument compiler and parser. With just two lines of code you can start to set up a command-line interface to your Java programs. Many advanced features including "required", "positional", "multiple", and the most advanced - "group"

When you need to allow for command-line options in your application, you need Argument.

As a user of a Linux system or a command-line Windows system you are likely to have used programs that require some parameters on the command line.

Windows:  dir /B 
Linux:  ls -l *</pre>

And more complex ones that extend beyond what you would normally expect on command-lines. This shows the use of an [embedded Argument parser] "--keys".

funnel myFile.txt --keys (String --length 10)(Integer --offset 10, --length 4)

Argument is a command-line parameter processing plugin for all of your Java applications.

It takes two steps in your code to use Argument: describe the command-line requirements to Argument, and then ask Argument to parse the command-line.

Read this first - it will help you to understand [how to interact with Argument] from the perspective of the command-line interface.

[Creating] the Argument Instance
[Compiling] your application's parser
[Parsing] the command line
[Retrieval of Values] or [Injection of Values] (--variable --class --factoryMethod --factoryArgName)

Most often this can be done in just a few lines of code.

This is a [brief tutorial] to get you acquainted with the processes. You will see that it takes only 1 line of extra code to implement Argument to parse the command line.


Project Members:


Related

Wiki: Compiling
Wiki: Creating
Wiki: Injection of Values
Wiki: Parsing
Wiki: Retrieval of Values
Wiki: brief tutorial
Wiki: embedded Argument parser
Wiki: how to interact with Argument

MongoDB Logo MongoDB