Enum CommandLineOption

java.lang.Object
java.lang.Enum<CommandLineOption>
org.apache.creadur.whisker.cli.CommandLineOption
All Implemented Interfaces:
Serializable, Comparable<CommandLineOption>, java.lang.constant.Constable

public enum CommandLineOption extends Enum<CommandLineOption>
Describes an option on the command line.
  • Enum Constant Details

    • LICENSE_DESCRIPTION

      public static final CommandLineOption LICENSE_DESCRIPTION
      License descriptor command line argument.
    • SOURCE

      public static final CommandLineOption SOURCE
      Application source command line argument.
    • ACT_TO_GENERATE

      public static final CommandLineOption ACT_TO_GENERATE
      Generation command line argument.
    • ACT_TO_AUDIT

      public static final CommandLineOption ACT_TO_AUDIT
      Audit command line argument.
    • ACT_TO_SKELETON

      public static final CommandLineOption ACT_TO_SKELETON
      Generate skeleton mete-data command line argument.
  • Method Details

    • values

      public static CommandLineOption[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static CommandLineOption valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • options

      public static org.apache.commons.cli.Options options()
      Creates options for the command line.
      Returns:
      not null
    • getLongName

      public String getLongName()
      Gets the long name of this command line argument.
      Returns:
      not null
    • getShortName

      public char getShortName()
      Gets the short name of this command line argument.
      Returns:
      the character short for this option
    • getDescription

      public String getDescription()
      Gets the description for this option.
      Returns:
      not null
    • create

      public org.apache.commons.cli.Option create()
      Builds a representation.
      Returns:
      not null
    • getOptionValue

      public String getOptionValue(org.apache.commons.cli.CommandLine commandLine)
      Gets an option value from the command line.
      Parameters:
      commandLine - not null
      Returns:
      not null
    • isSetOn

      public boolean isSetOn(org.apache.commons.cli.CommandLine commandLine)
      Is the short name option set?
      Parameters:
      commandLine - not null
      Returns:
      true when the option is present, false otherwise