Examples of parseAndHelp()


Examples of org.apache.commons.cli2.commandline.Parser.parseAndHelp()

    // configure a parser
    Parser p = new Parser();
    p.setGroup(group);
    p.setHelpFormatter(hf);
    p.setHelpOption(oBuilder.withLongName("help").withShortName("?").create());
    cl = p.parseAndHelp(args);

    // abort application if no CommandLine was parsed
    if (cl == null)
    {
      System.exit(-1);
View Full Code Here

Examples of org.apache.commons.cli2.commandline.Parser.parseAndHelp()

    Parser parser = new Parser();
    parser.setHelpOption(help);
    parser.setHelpTrigger("--help");
    parser.setGroup(normalArgs);
    parser.setHelpFormatter(new HelpFormatter(" ", "", " ", 130));
    CommandLine cmdLine = parser.parseAndHelp(args);

    if (cmdLine == null) {
      return false;
    }
View Full Code Here

Examples of org.apache.commons.cli2.commandline.Parser.parseAndHelp()

    Parser parser = new Parser();
    parser.setHelpOption(help);
    parser.setHelpTrigger("--help");
    parser.setGroup(normalArgs);
    parser.setHelpFormatter(new HelpFormatter(" ", "", " ", 130));
    CommandLine cmdLine = parser.parseAndHelp(args);

    if (cmdLine == null) {
      return false;
    }
View Full Code Here

Examples of org.apache.commons.cli2.commandline.Parser.parseAndHelp()

    Parser parser = new Parser();
    parser.setHelpOption(help);
    parser.setHelpTrigger("--help");
    parser.setGroup(normalArgs);
    parser.setHelpFormatter(new HelpFormatter(" ", "", " ", 130));
    CommandLine cmdLine = parser.parseAndHelp(args);

    if (cmdLine == null) {
      return false;
    }
View Full Code Here

Examples of org.apache.commons.cli2.commandline.Parser.parseAndHelp()

    Parser parser = new Parser();
    parser.setHelpOption(help);
    parser.setHelpTrigger("--help");
    parser.setGroup(normalArgs);
    parser.setHelpFormatter(new HelpFormatter(" ", "", " ", 130));
    CommandLine cmdLine = parser.parseAndHelp(args);

    if (cmdLine == null) {
      return false;
    }
View Full Code Here

Examples of org.apache.commons.cli2.commandline.Parser.parseAndHelp()

        Parser parser = new Parser();
        parser.setHelpFormatter(hf);
        parser.setGroup(main);
        System.out.println(main);

        CommandLine cl = parser.parseAndHelp(args);
        if (cl != null) {
            if (exit.execute(null, cl)) {
                System.out.println("exit executed");
            } else if (help.execute(null, cl)) {
                System.out.println("help executed.");
View Full Code Here

Examples of org.apache.commons.cli2.commandline.Parser.parseAndHelp()

   
    public boolean execute(String[] args) {
        Parser parser = new Parser();
        parser.setHelpFormatter(getCmdHelpFormatter(null));
        parser.setGroup(getCommandsGroup());
        CommandLine cl = parser.parseAndHelp(args);
        return cl != null && execute(cl);
    }

    public boolean execute(CommandLine cl) {
        Iterator iter = commands.iterator();
View Full Code Here

Examples of org.apache.commons.cli2.commandline.Parser.parseAndHelp()

    parser.setHelpOption(help);
    parser.setHelpTrigger("--help");
    parser.setGroup(normalArgs);
    parser.setHelpFormatter(new HelpFormatter(" ", "", " ", 150));

    CommandLine cmdLine = parser.parseAndHelp(args);
    if (cmdLine == null) {
      return false;
    }

    trainFile = (String) cmdLine.getValue(inputFileOption);
View Full Code Here

Examples of org.apache.commons.cli2.commandline.Parser.parseAndHelp()

    Parser parser = new Parser();
    parser.setHelpOption(help);
    parser.setHelpTrigger("--help");
    parser.setGroup(normalArgs);
    parser.setHelpFormatter(new HelpFormatter(" ", "", " ", 130));
    CommandLine cmdLine = parser.parseAndHelp(args);

    if (cmdLine == null) {
      return false;
    }
View Full Code Here

Examples of org.apache.commons.cli2.commandline.Parser.parseAndHelp()

    Parser parser = new Parser();
    parser.setHelpOption(help);
    parser.setHelpTrigger("--help");
    parser.setGroup(normalArgs);
    parser.setHelpFormatter(new HelpFormatter(" ", "", " ", 130));
    CommandLine cmdLine = parser.parseAndHelp(args);

    if (cmdLine == null) {
      return false;
    }
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.