Example usage for org.apache.commons.cli Option argName

List of usage examples for org.apache.commons.cli Option argName

Introduction

In this page you can find the example usage for org.apache.commons.cli Option argName.

Prototype

String argName

To view the source code for org.apache.commons.cli Option argName.

Click Source Link

Document

the name of the argument for this option

Usage

From source file:org.zend.sdkcli.internal.options.DetectOptionUtility.java

private static void addString(Options options, Method method) {
    final Option a = method.getAnnotation(Option.class);

    // create option object
    final org.apache.commons.cli.Option o = new org.apache.commons.cli.Option(a.opt(), a.description());
    if (a.longOpt() != null && a.longOpt().length() > 0) {
        o.setLongOpt(a.longOpt());/*from  ww w  .  j a  v a 2  s  . c  o  m*/
    }
    o.setArgs(a.numberOfArgs());
    o.setRequired(a.required());
    o.setType(a.type());
    o.setArgName(a.argName());

    // assign to options list
    options.addOption(o);
}