Package joptsimple

Examples of joptsimple.BuiltinHelpFormatter


    public static void main(String[] args) throws Exception {
        // allow client to choose another network for testing by passing through an argument.
        OptionParser parser = new OptionParser();
        parser.accepts("network").withRequiredArg().withValuesConvertedBy(regex("(mainnet)|(testnet)|(regtest)")).defaultsTo("mainnet");
        parser.accepts("help").forHelp();
        parser.formatHelpWith(new BuiltinHelpFormatter(120, 10));
        OptionSet options;

        try {
            options = parser.parse(args);
        } catch (OptionException e) {
View Full Code Here


        // allow client to choose another network for testing by passing through an argument.
        OptionParser parser = new OptionParser();
        parser.accepts("network").withRequiredArg().withValuesConvertedBy(regex("(mainnet)|(testnet)|(regtest)")).defaultsTo("mainnet");
        parser.accepts("server").withRequiredArg().required();
        parser.accepts("help").forHelp();
        parser.formatHelpWith(new BuiltinHelpFormatter(120, 10));
        OptionSet options;

        try {
            options = parser.parse(args);
        } catch (OptionException e) {
View Full Code Here

    return ExitStatus.OK;
  }

  public String getHelp() {
    if (this.help == null) {
      getParser().formatHelpWith(new BuiltinHelpFormatter(80, 2));
      OutputStream out = new ByteArrayOutputStream();
      try {
        getParser().printHelpOn(out);
      }
      catch (IOException ex) {
View Full Code Here

TOP

Related Classes of joptsimple.BuiltinHelpFormatter

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.