Package com.beust.jcommander

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


    assertEquals("localhost:2181", args.zookeepers);
    assertFalse(args.help);

    JCommander jc = new JCommander();
    jc.addObject(args);
    jc.addObject(bwOpts);
    jc.addObject(bsOpts);
    jc.parse("-u", "bar", "-p", "foo", "--batchLatency", "3s", "--batchTimeout", "2s", "--batchMemory", "1M", "--debug", "--trace", "--scanThreads", "7", "-i",
        "instance", "--auths", "G1,G2,G3", "-z", "zoohost1,zoohost2", "--help");
    assertEquals("bar", args.principal);
    assertNull(args.securePassword);
View Full Code Here


    assertFalse(args.help);

    JCommander jc = new JCommander();
    jc.addObject(args);
    jc.addObject(bwOpts);
    jc.addObject(bsOpts);
    jc.parse("-u", "bar", "-p", "foo", "--batchLatency", "3s", "--batchTimeout", "2s", "--batchMemory", "1M", "--debug", "--trace", "--scanThreads", "7", "-i",
        "instance", "--auths", "G1,G2,G3", "-z", "zoohost1,zoohost2", "--help");
    assertEquals("bar", args.principal);
    assertNull(args.securePassword);
    assertEquals(new PasswordToken("foo"), args.getToken());
View Full Code Here

    fileWriter.append("</configuration>\n");
    fileWriter.close();

    JCommander jc = new JCommander();
    jc.addObject(args);

    jc.parse("--site-file", siteXml.getAbsolutePath());

    args.getInstance();
  }
View Full Code Here

    fileWriter.append("</configuration>\n");
    fileWriter.close();

    JCommander jc = new JCommander();
    jc.addObject(args);

    jc.parse("--site-file", siteXml.getAbsolutePath());

    args.getInstance();
  }
View Full Code Here

  public boolean config(String... args) {
    ShellOptionsJC options = new ShellOptionsJC();
    JCommander jc = new JCommander();

    jc.setProgramName("accumulo shell");
    jc.addObject(options);
    try {
      jc.parse(args);
    } catch (ParameterException e) {
      configError = true;
    }
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.