Package joptsimple

Examples of joptsimple.OptionParser.acceptsAll()


    WatchOperationOptions operationOptions = new WatchOperationOptions();

    OptionParser parser = new OptionParser()
    OptionSpec<Integer> optionInterval = parser.acceptsAll(asList("i", "interval")).withRequiredArg().ofType(Integer.class);
    OptionSpec<Void> optionNoAnnouncements = parser.acceptsAll(asList("N", "no-announcements"));
    OptionSpec<String> optionAnnouncements = parser.acceptsAll(asList("a", "announce")).withRequiredArg();
    OptionSpec<Void> optionNoWatcher = parser.acceptsAll(asList("W", "no-watcher"));
    OptionSpec<Integer> optionSettleDelay = parser.acceptsAll(asList("s", "delay")).withRequiredArg().ofType(Integer.class);
   
    OptionSet options = parser.parse(operationArgs)
   
View Full Code Here


    OptionParser parser = new OptionParser()
    OptionSpec<Integer> optionInterval = parser.acceptsAll(asList("i", "interval")).withRequiredArg().ofType(Integer.class);
    OptionSpec<Void> optionNoAnnouncements = parser.acceptsAll(asList("N", "no-announcements"));
    OptionSpec<String> optionAnnouncements = parser.acceptsAll(asList("a", "announce")).withRequiredArg();
    OptionSpec<Void> optionNoWatcher = parser.acceptsAll(asList("W", "no-watcher"));
    OptionSpec<Integer> optionSettleDelay = parser.acceptsAll(asList("s", "delay")).withRequiredArg().ofType(Integer.class);
   
    OptionSet options = parser.parse(operationArgs)
   
    // --interval
View Full Code Here

    OptionParser parser = new OptionParser()
    OptionSpec<Integer> optionInterval = parser.acceptsAll(asList("i", "interval")).withRequiredArg().ofType(Integer.class);
    OptionSpec<Void> optionNoAnnouncements = parser.acceptsAll(asList("N", "no-announcements"));
    OptionSpec<String> optionAnnouncements = parser.acceptsAll(asList("a", "announce")).withRequiredArg();
    OptionSpec<Void> optionNoWatcher = parser.acceptsAll(asList("W", "no-watcher"));
    OptionSpec<Integer> optionSettleDelay = parser.acceptsAll(asList("s", "delay")).withRequiredArg().ofType(Integer.class);
   
    OptionSet options = parser.parse(operationArgs)
   
    // --interval
    if (options.has(optionInterval)) {
View Full Code Here

  @Override
  public PluginOperationOptions parseOptions(String[] operationArgs) throws Exception {
    PluginOperationOptions operationOptions = new PluginOperationOptions();

    OptionParser parser = new OptionParser();
    OptionSpec<Void> optionLocal = parser.acceptsAll(asList("L", "local-only"));
    OptionSpec<Void> optionRemote = parser.acceptsAll(asList("R", "remote-only"));
    OptionSpec<Void> optionSnapshots = parser.acceptsAll(asList("s", "snapshot", "snapshots"));

    OptionSet options = parser.parse(operationArgs);
View Full Code Here

  public PluginOperationOptions parseOptions(String[] operationArgs) throws Exception {
    PluginOperationOptions operationOptions = new PluginOperationOptions();

    OptionParser parser = new OptionParser();
    OptionSpec<Void> optionLocal = parser.acceptsAll(asList("L", "local-only"));
    OptionSpec<Void> optionRemote = parser.acceptsAll(asList("R", "remote-only"));
    OptionSpec<Void> optionSnapshots = parser.acceptsAll(asList("s", "snapshot", "snapshots"));

    OptionSet options = parser.parse(operationArgs);

    // Files
View Full Code Here

    PluginOperationOptions operationOptions = new PluginOperationOptions();

    OptionParser parser = new OptionParser();
    OptionSpec<Void> optionLocal = parser.acceptsAll(asList("L", "local-only"));
    OptionSpec<Void> optionRemote = parser.acceptsAll(asList("R", "remote-only"));
    OptionSpec<Void> optionSnapshots = parser.acceptsAll(asList("s", "snapshot", "snapshots"));

    OptionSet options = parser.parse(operationArgs);

    // Files
    List<?> nonOptionArgs = options.nonOptionArguments();
View Full Code Here

    UpOperationOptions operationOptions = new UpOperationOptions();

    OptionParser parser = new OptionParser();
    parser.allowsUnrecognizedOptions();

    OptionSpec<Void> optionForceUpload = parser.acceptsAll(asList("F", "force-upload"));

    OptionSet options = parser.parse(operationArgs);

    // status [<args>]
    operationOptions.setStatusOptions(parseStatusOptions(operationArgs));
View Full Code Here

  @Override
  public InitOperationOptions parseOptions(String[] operationArguments) throws Exception {
    InitOperationOptions operationOptions = new InitOperationOptions();

    OptionParser parser = new OptionParser();
    OptionSpec<Void> optionCreateTargetPath = parser.acceptsAll(asList("t", "create-target"));
    OptionSpec<Void> optionAdvanced = parser.acceptsAll(asList("a", "advanced"));
    OptionSpec<Void> optionNoCompression = parser.acceptsAll(asList("G", "no-compression"));
    OptionSpec<Void> optionNoEncryption = parser.acceptsAll(asList("E", "no-encryption"));
    OptionSpec<String> optionPlugin = parser.acceptsAll(asList("P", "plugin")).withRequiredArg();
    OptionSpec<String> optionPluginOpts = parser.acceptsAll(asList("o", "plugin-option")).withRequiredArg();
View Full Code Here

  public InitOperationOptions parseOptions(String[] operationArguments) throws Exception {
    InitOperationOptions operationOptions = new InitOperationOptions();

    OptionParser parser = new OptionParser();
    OptionSpec<Void> optionCreateTargetPath = parser.acceptsAll(asList("t", "create-target"));
    OptionSpec<Void> optionAdvanced = parser.acceptsAll(asList("a", "advanced"));
    OptionSpec<Void> optionNoCompression = parser.acceptsAll(asList("G", "no-compression"));
    OptionSpec<Void> optionNoEncryption = parser.acceptsAll(asList("E", "no-encryption"));
    OptionSpec<String> optionPlugin = parser.acceptsAll(asList("P", "plugin")).withRequiredArg();
    OptionSpec<String> optionPluginOpts = parser.acceptsAll(asList("o", "plugin-option")).withRequiredArg();
    OptionSpec<Void> optionAddDaemon = parser.acceptsAll(asList("n", "add-daemon"));
View Full Code Here

    InitOperationOptions operationOptions = new InitOperationOptions();

    OptionParser parser = new OptionParser();
    OptionSpec<Void> optionCreateTargetPath = parser.acceptsAll(asList("t", "create-target"));
    OptionSpec<Void> optionAdvanced = parser.acceptsAll(asList("a", "advanced"));
    OptionSpec<Void> optionNoCompression = parser.acceptsAll(asList("G", "no-compression"));
    OptionSpec<Void> optionNoEncryption = parser.acceptsAll(asList("E", "no-encryption"));
    OptionSpec<String> optionPlugin = parser.acceptsAll(asList("P", "plugin")).withRequiredArg();
    OptionSpec<String> optionPluginOpts = parser.acceptsAll(asList("o", "plugin-option")).withRequiredArg();
    OptionSpec<Void> optionAddDaemon = parser.acceptsAll(asList("n", "add-daemon"));
    OptionSpec<Void> optionShortUrl = parser.acceptsAll(asList("s", "short"));   
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.