Package org.apache.commons.cli2.builder

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


    private Option optRecursive;
    private Argument argPath;

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


    public String getShortDescription() {
        return "Debug.";
    }

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

    private Option optConfig;

    private Option optFilter;

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

    private Argument argJcrPath;

    private Option optKeepChanges;

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

    }

    private Argument argJcrPath;

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

public class TestSubHelp {

    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();

        CmdSet set = new CmdSet();

        CliHelpFormatter hf = CliHelpFormatter.create();
View Full Code Here

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

                "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

    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

    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

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.