Examples of CommandBuilder


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

public class Test {

    public static void main(String[] args) throws Exception {
        final DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
        final ArgumentBuilder abuilder = new ArgumentBuilder();
        final CommandBuilder cbuilder = new CommandBuilder();
        final GroupBuilder gbuilder = new GroupBuilder();

        Option recursive =
                obuilder
                        .withShortName("r")
                        .withLongName("recursive")
                        .withDescription("do recursively")
                        .create();
        Command update =
                cbuilder
                        .withName("update")
                        .withName("up")
                        .withDescription("update the work directory")
                        /*
                        .withChildren(new GroupBuilder()
View Full Code Here

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

                "Example:\n" +
                "  vlt import http://localhost:4502/crx . /";
    }

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

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

    public String getShortDescription() {
        return "print hello";
    }

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

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

    public String getShortDescription() {
        return "stores the current console configuration";
    }

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

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

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

    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

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

    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

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

    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

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

                "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

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

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

    protected Command createCommand() {
        return new CommandBuilder()
                .withName("exit")
                .withName("quit")
                .withDescription(getShortDescription())
                .create();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.