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

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

Introduction

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

Prototype

public CommandBuilder withChildren(final Group newChildren) 

Source Link

Document

Specifies the children 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);/*ww  w  .  jav  a 2 s  .co m*/

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