1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.cli.processor;
7   
8   import org.apache.commons.cli.Option;
9   
10  import edu.umd.cs.findbugs.annotations.NonNull;
11  
12  public final class OptionUtils {
13  
14    private OptionUtils() {
15      // disable construction
16    }
17  
18    @NonNull
19    public static String toArgument(@NonNull Option option) {
20      return option.hasLongOpt() ? "--" + option.getLongOpt() : "-" + option.getOpt();
21    }
22  
23  }