Example usage for org.apache.commons.cli2.builder CommandBuilder withName

List of usage examples for org.apache.commons.cli2.builder CommandBuilder withName

Introduction

In this page you can find the example usage for org.apache.commons.cli2.builder CommandBuilder withName.

Prototype

public CommandBuilder withName(final String name) 

Source Link

Document

Specifies the name for the next Command that is created.

Usage

From source file:egat.cli.AbstractCommandHandler.java

protected Command createCommand() {
    final CommandBuilder commandBuilder = new CommandBuilder();

    final GroupBuilder groupBuilder = new GroupBuilder();

    commandBuilder.withName(getCommandName());

    addCommandDescription(commandBuilder);

    addChildOptions(groupBuilder);/* w  w  w . j  a v  a2s . c o  m*/

    return commandBuilder.withChildren(groupBuilder.create()).create();
}