Package org.apache.commons.cli2.builder

Examples of org.apache.commons.cli2.builder.CommandBuilder


    public String getShortDescription() {
        return "Run an interactive console";
    }

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("console")
                .withDescription(getShortDescription())
                .withChildren(new GroupBuilder()
                        .withName("Options:")
                        .withOption(new DefaultOptionBuilder()
View Full Code Here


    public String getShortDescription() {
        return "execute a macro";
    }

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("exec")
                .withDescription(getShortDescription())
                .withChildren(new GroupBuilder()
                        .withName("Options:")
                        .withOption(argMacro = new ArgumentBuilder()
View Full Code Here

    public String getShortDescription() {
        return "load a console configuration";
    }

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("load")
                .withDescription(getShortDescription())
                .withChildren(new GroupBuilder()
                        .withName("Options:")
                        .withOption(argFile = new ArgumentBuilder()
View Full Code Here

    public String getShortDescription() {
        return "print this help.  Type 'help <subcommand>' for help on a specific subcommand.";
    }

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("help")
                .withDescription(getShortDescription())
                .withChildren(new GroupBuilder()
                        .withName("Options:")
                        .withOption(argCommand = new ArgumentBuilder()
View Full Code Here

                "a command in the history, use !<idx>, where <idx> is the index " +
                "of the command in the history.\n";
    }

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("history")
                .withDescription(getShortDescription())
                .create();
    }
View Full Code Here

    public String getShortDescription() {
        return "quit the console";
    }

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("exit")
                .withName("quit")
                .withDescription(getShortDescription())
                .create();
    }
View Full Code Here

    public String getShortDescription() {
        return "print the current work path";
    }

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("pwd")
                .withDescription(getShortDescription())
                .create();
    }
View Full Code Here

    public String getShortDescription() {
        return "change the execution context.";
    }

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("ctx")
                .withDescription(getShortDescription())
                .withChildren(new GroupBuilder()
                        .withName("Options:")
                        .withOption(argContext = new ArgumentBuilder()
View Full Code Here

    public String getShortDescription() {
        return "print the current environment properties";
    }

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("env")
                .withDescription(getShortDescription())
                .create();
    }
View Full Code Here

                "Please note that some properties are read-only and cannot be" +
                "set.";
    }

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("set")
                .withDescription(getShortDescription())
                .withChildren(new GroupBuilder()
                        .withName("Options:")
                        .withOption(argKey= new ArgumentBuilder()
View Full Code Here

TOP

Related Classes of org.apache.commons.cli2.builder.CommandBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.