Groovy 1.7.0

## groovy.util
Class CliBuilder

    java.lang.Object
      groovy.util.CliBuilder

    class CliBuilder
    extends Object

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

Property Summary
`org.apache.commons.cli.HelpFormatter` | `formatter`
`org.apache.commons.cli.Options` | `options`
`org.apache.commons.cli.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.
`org.apache.commons.cli.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)

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Property Detail

### formatter

    org.apache.commons.cli.HelpFormatter formatter

### options

    org.apache.commons.cli.Options options

### parser

    org.apache.commons.cli.CommandLineParser parser

### posix

    boolean posix

### usage

    String usage

### writer

    PrintWriter writer

Constructor Detail

### CliBuilder

    CliBuilder()

Method Detail

### invokeMethod

    public def invokeMethod(String name, Object args)

  Recognize all one-character method calls as option specifications.

### option

    org.apache.commons.cli.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)

Copyright © 2003-2009 The Codehaus. All rights reserved.