org.apache.commons.cli.Parser.getOptions()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中org.apache.commons.cli.Parser.getOptions()方法的一些代码示例,展示了Parser.getOptions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.getOptions()方法的具体详情如下:
包路径:org.apache.commons.cli.Parser
类名称:Parser
方法名:getOptions

Parser.getOptions介绍

暂无

代码示例

代码示例来源:origin: commons-cli/commons-cli

/**
   * Removes the option or its group from the list of expected elements.
   * 
   * @param opt
   */
  private void updateRequiredOptions(Option opt) throws ParseException
  {
    // if the option is a required option remove the option from
    // the requiredOptions list
    if (opt.isRequired())
    {
      getRequiredOptions().remove(opt.getKey());
    }

    // if the option is in an OptionGroup make that option the selected
    // option of the group
    if (getOptions().getOptionGroup(opt) != null)
    {
      OptionGroup group = getOptions().getOptionGroup(opt);

      if (group.isRequired())
      {
        getRequiredOptions().remove(group);
      }

      group.setSelected(opt);
    }
  }
}

代码示例来源:origin: commons-cli/commons-cli

if (getOptions().hasOption(str) && str.startsWith("-"))

代码示例来源:origin: commons-cli/commons-cli

boolean hasOption = getOptions().hasOption(arg);
Option opt = (Option) getOptions().getOption(arg).clone();

代码示例来源:origin: commons-cli/commons-cli

List<String> tokenList = Arrays.asList(flatten(getOptions(), arguments, stopAtNonOption));
    if (stopAtNonOption && !getOptions().hasOption(t))

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.cli

Option opt = getOptions().getOption(option);

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

if (getOptions().hasOption(str) && str.startsWith("-"))

代码示例来源:origin: sdedit/sdedit

Option opt = getOptions().getOption(option);

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.cli

if (getOptions().hasOption(str) && str.startsWith("-"))

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
   * Removes the option or its group from the list of expected elements.
   * 
   * @param opt
   */
  private void updateRequiredOptions(Option opt) throws ParseException
  {
    // if the option is a required option remove the option from
    // the requiredOptions list
    if (opt.isRequired())
    {
      getRequiredOptions().remove(opt.getKey());
    }

    // if the option is in an OptionGroup make that option the selected
    // option of the group
    if (getOptions().getOptionGroup(opt) != null)
    {
      OptionGroup group = getOptions().getOptionGroup(opt);

      if (group.isRequired())
      {
        getRequiredOptions().remove(group);
      }

      group.setSelected(opt);
    }
  }
}

代码示例来源:origin: sdedit/sdedit

if (getOptions().hasOption(str) && str.startsWith("-"))

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.cli

List tokenList = Arrays.asList(flatten(getOptions(), arguments, stopAtNonOption));
    if (stopAtNonOption && !getOptions().hasOption(t))

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.cli

boolean hasOption = getOptions().hasOption(arg);
Option opt = (Option) getOptions().getOption(arg).clone();
if (getOptions().getOptionGroup(opt) != null)
  OptionGroup group = getOptions().getOptionGroup(opt);

代码示例来源:origin: sdedit/sdedit

List tokenList = Arrays.asList(flatten(getOptions(), arguments, stopAtNonOption));
    if (stopAtNonOption && !getOptions().hasOption(t))

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

boolean hasOption = getOptions().hasOption(arg);
Option opt = (Option) getOptions().getOption(arg).clone();

代码示例来源:origin: sdedit/sdedit

boolean hasOption = getOptions().hasOption(arg);
Option opt = (Option) getOptions().getOption(arg).clone();
if (getOptions().getOptionGroup(opt) != null)
  OptionGroup group = getOptions().getOptionGroup(opt);

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

List<String> tokenList = Arrays.asList(flatten(getOptions(), arguments, stopAtNonOption));
    if (stopAtNonOption && !getOptions().hasOption(t))

相关文章