Examples of nonOptionArguments()


Examples of joptsimple.OptionSet.nonOptionArguments()

  public int run(InputStream in, PrintStream out, PrintStream err,
      List<String> args) throws Exception {
   
    OptionSet optionSet = parser.parse(args.toArray(new String[0]));

    if (!optionSet.nonOptionArguments().isEmpty()) {
      printUsage(parser, err);
      return -1;
    }
    try {
      ClusterSpec clusterSpec = getClusterSpec(optionSet);
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

  public int run(InputStream in, PrintStream out, PrintStream err,
      List<String> args) throws Exception {
   
    OptionSet optionSet = parser.parse(args.toArray(new String[0]));

    if (!optionSet.nonOptionArguments().isEmpty()) {
      printUsage(parser, err);
      return -1;
    }
   
    try {
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

    OptionSpec<String> data =
      p.accepts("data", "JSON-encoded response datum.")
      .withRequiredArg()
      .ofType(String.class);
    OptionSet opts = p.parse(args.toArray(new String[0]));
    args = opts.nonOptionArguments();

    if (args.size() != 3) {
      err.println("Usage: uri protocol_file message_name (-data d | -file f)");
      p.printHelpOn(err);
      return 1;
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

        OptionParser parser = new OptionParser();
        parser.accepts("datastore", "keep data store");

        OptionSet options = parser.parse(args);

        List<String> argList = options.nonOptionArguments();
        if (argList.size() == 2 || argList.size() == 3) {
            File dir = new File(argList.get(0));
            File xml = new File(dir, "repository.xml");
            String dst = argList.get(1);
            if (argList.size() == 3) {
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

        OptionSet options = parser.parse(args);

        OakFixture oakFixture;

        List<String> arglist = options.nonOptionArguments();
        String uri = (arglist.isEmpty()) ? defaultUri : arglist.get(0);
        String fix = (arglist.size() <= 1) ? OakFixture.OAK_MEMORY : arglist.get(1);

        int cacheSize = cache.value(options);
        List<Integer> cIds = Collections.emptyList();
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

            new ConcurrentCreateNodesTest(),
            new SequentialCreateNodesTest(),
            new GetPoliciesTest(),
        };

        Set<String> argset = Sets.newHashSet(options.nonOptionArguments());
        List<RepositoryFixture> fixtures = Lists.newArrayList();
        for (RepositoryFixture fixture : allFixtures) {
            if (argset.remove(fixture.toString())) {
                fixtures.add(fixture);
            }
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

    OptionSpec<String> data =
      p.accepts("data", "JSON-encoded response datum.")
      .withRequiredArg()
      .ofType(String.class);
    OptionSet opts = p.parse(args.toArray(new String[0]));
    args = opts.nonOptionArguments();

    if (args.size() != 3) {
      err.println("Usage: uri protocol_file message_name (-data d | -file f)");
      p.printHelpOn(err);
      return 1;
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

    OptionSpec<String> data =
      p.accepts("data", "JSON-encoded request parameters.")
      .withRequiredArg()
      .ofType(String.class);
    OptionSet opts = p.parse(args.toArray(new String[0]));
    args = opts.nonOptionArguments();

    if (args.size() != 3) {
      err.println("Usage: uri protocol_file message_name (-data d | -file f)");
      p.printHelpOn(err);
      return 1;
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

  public int run(InputStream stdin, PrintStream out, PrintStream err,
      List<String> args) throws Exception {
     
    OptionParser p = new OptionParser();
    OptionSet opts = p.parse(args.toArray(new String[0]));
    if (opts.nonOptionArguments().size() != 2) {
      err.println("Expected 2 args: from_file to_file (local filenames," +
      " Hadoop URI's, or '-' for stdin/stdout");
      p.printHelpOn(err);
      return 1;
    }
View Full Code Here

Examples of joptsimple.OptionSet.nonOptionArguments()

      .withRequiredArg()
      .defaultsTo("null")
      .ofType(String.class);
    OptionSet opts = p.parse(args.toArray(new String[0]));

    if (opts.nonOptionArguments().size() != 2) {
      err.println("Expected 2 args: schema input_file");
      p.printHelpOn(err);
      return 1;
    }
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.