Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.util
Class CliBuilder

Supported Option Properties: argName: String longOpt: String args: int optionalArg: boolean required: boolean type: Object valueSeparator: char

see:
  org.apache.commons.cli.Option for meaning of the parameters.

see:
  CliBuilderTest for example usages.

author:
  Dierk Koenig

Field Summary
`HelpFormatter` | `formatter`
`Options` | `options`
`CommandLineParser` | `parser`
`boolean` | `posix`
`String` | `usage`
`PrintWriter` | `writer`

Constructor Summary
`CliBuilder()`

Method Summary
`def` | `invokeMethod(String name, Object args)` Recognize all one-character method calls as option specifications.
`Option` | `option(def shortname, Map details, def info)` How to create an option from the specification.
`OptionAccessor` | `parse(def args)` Make options accessible from command line args with parser (default: Posix).
`void` | `usage()` Print the usage message with writer (default: System.out) and formatter (default: HelpFormatter)

Constructor Detail

### CliBuilder

    CliBuilder()

Method Detail

### invokeMethod

    public def invokeMethod(String name, Object args)

  Recognize all one-character method calls as option specifications.

### option

    Option option(def shortname, Map details, def info)

  How to create an option from the specification.

### parse

    OptionAccessor parse(def args)

  Make options accessible from command line args with parser (default: Posix). Returns null on bad command lines.

### usage

    void usage()

  Print the usage message with writer (default: System.out) and formatter (default: HelpFormatter)