Package com.beust.jcommander

Examples of com.beust.jcommander.JCommander.usage()


    Opts opts = new Opts();
    JCommander jc = new JCommander(opts);
    jc.setProgramName(NativeMapConcurrencyTest.class.getName());
    jc.parse(args);
    if (opts.help) {
      jc.usage();
      return;
    }
    NativeMap nm = create(opts.rows, opts.cols);
    runTest(nm, opts.rows, opts.cols, opts.threads, opts.writeThreads);
    nm.delete();
View Full Code Here


        } else {
            if (parameters.isEmpty()) {
                cli.printShortCommandList(jc);
            } else {
                String command = parameters.get(0);
                jc.usage(command);
            }
        }
    }

}
View Full Code Here

        try {
            jCommander.parse(args);

            if (this.showHelp) {
                jCommander.usage();
                exit(EXIT_OKAY);
            }
        } catch (ParameterException e) {
            System.err.println(e.getMessage());
            jCommander.usage();
View Full Code Here

                jCommander.usage();
                exit(EXIT_OKAY);
            }
        } catch (ParameterException e) {
            System.err.println(e.getMessage());
            jCommander.usage();
            exit(EXIT_ERROR);
        }

        return this;
    }
View Full Code Here

      String[] valid = {"-f", "file"};
      new JCommander(o, valid).usage();
      System.exit(-1);
    }
    if (o.help) {
      jc.usage();
      System.exit(0);
    }

    /*Check if dump file exists*/
    File file = new File(o.location);
View Full Code Here

      String[] valid = {"-f", "file", "-t", "physical"};
      new JCommander(o, valid).usage();
      System.exit(-1);
    }
    if (o.help) {
      jc.usage();
      System.exit(0);
    }

    System.exit(submitter.submitQuery(o.location, o.queryString, o.planType, o.zk, o.local, o.bits, o.format, o.width));
  }
View Full Code Here

  public static StartupOptions parse(String[] cliArgs) {
    logger.debug("Parsing arguments.");
    StartupOptions args = new StartupOptions();
    JCommander jc = new JCommander(args, cliArgs);
    if(args.help){
      jc.usage();
      System.exit(0);
    }
    return args;
  }
View Full Code Here

      configError = true;
      logError("Unrecognized Options: " + options.getUnrecognizedOptions().toString());
    }

    if (configError) {
      jc.usage();
      return true;
    }

    setDebugging(options.isDebugEnabled());
    authTimeout = options.getAuthTimeout() * 60 * 1000; // convert minutes to milliseconds
View Full Code Here

    } else if ("generate-self-trusted".equals(operation)) {
      certUtils.createSelfSignedCert(new File(opts.truststore), opts.keyNamePrefix + "-selfTrusted", "");
    } else {
      JCommander jcommander = new JCommander(opts);
      jcommander.setProgramName(CertUtils.class.getName());
      jcommander.usage();
      System.err.println("Unrecognized operation: " + opts.operation);
      System.exit(0);
    }
  }
View Full Code Here

        Swift2ThriftGeneratorCommandLineConfig cliConfig = new Swift2ThriftGeneratorCommandLineConfig();
        JCommander jCommander = new JCommander(cliConfig, args);
        jCommander.setProgramName(Swift2ThriftGenerator.class.getSimpleName());

        if (cliConfig.inputFiles == null) {
            jCommander.usage();
            return;
        }

        ImmutableMap.Builder<String, String> mapBuilder = ImmutableMap.builder();
        if (cliConfig.includeMap != null) {
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.