001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package gov.nist.secauto.metaschema.cli.processor;
007
008import org.apache.commons.cli.Option;
009
010import edu.umd.cs.findbugs.annotations.NonNull;
011
012public final class OptionUtils {
013
014  private OptionUtils() {
015    // disable construction
016  }
017
018  @NonNull
019  public static String toArgument(@NonNull Option option) {
020    return option.hasLongOpt() ? "--" + option.getLongOpt() : "-" + option.getOpt();
021  }
022
023}