Enum Class CLIFlags

java.lang.Object
java.lang.Enum<CLIFlags>
de.spiritscorp.datasync.CLIFlags
All Implemented Interfaces:
Serializable, Comparable<CLIFlags>, Constable

public enum CLIFlags extends Enum<CLIFlags>
Defines the supported command-line interface (CLI) switches and arguments utilized to configure the application's runtime environment during the bootstrapping phase.
Version:
1.0.0
Author:
Tom Spirit
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Command-line flag to enforce an extended initialization pause during system boot sequences to prevent resource contention.
    Command-line argument to specify a custom directory path hosting configuration files, profiles, and sync maps.
    Command-line flag to activate verbose diagnostic logging streams to the standard console output.
    Command-line flag to mirror or redirect diagnostic debug streams into a local file system log repository.
    Fallback flag used when no matching command-line argument is detected to prevent NullPointerExceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    static CLIFlags
    Resolves a raw command-line argument string to its corresponding strongly-typed CLIFlags representation.
    Retrieves the verbose argument identifier prefix.
    Retrieves the single-character mnemonic alias prefix.
    static CLIFlags
    Returns the enum constant of this class with the specified name.
    static CLIFlags[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CONFIG_DIR

      public static final CLIFlags CONFIG_DIR
      Command-line argument to specify a custom directory path hosting configuration files, profiles, and sync maps.
    • BOOT_DELAY

      public static final CLIFlags BOOT_DELAY
      Command-line flag to enforce an extended initialization pause during system boot sequences to prevent resource contention.
    • DEBUG

      public static final CLIFlags DEBUG
      Command-line flag to activate verbose diagnostic logging streams to the standard console output.
    • DEBUG_TO_FILE

      public static final CLIFlags DEBUG_TO_FILE
      Command-line flag to mirror or redirect diagnostic debug streams into a local file system log repository.
    • NONE

      public static final CLIFlags NONE
      Fallback flag used when no matching command-line argument is detected to prevent NullPointerExceptions.
  • Method Details

    • values

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

      public static CLIFlags valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromArgument

      public static CLIFlags fromArgument(String arg)
      Resolves a raw command-line argument string to its corresponding strongly-typed CLIFlags representation.

      This method serves as the central factory for command-line argument mapping and employs a defensive, null-safe lookup strategy. It supports exact match evaluation for standardized flags as well as prefix-based evaluation to handle parameterized switches (such as directory paths attached directly to the configuration argument).

      If the input string is null, blank, or fails to match any registered application switch, this method returns NONE to ensure safe downstream processing without the risk of encountering a NullPointerException.

      Parameters:
      arg - the raw terminal argument to evaluate (can be null or blank)
      Returns:
      the resolved CLIFlags enum constant, or NONE as a robust fallback if unrecognized
    • getLongFlag

      public String getLongFlag()
      Retrieves the verbose argument identifier prefix.
      Returns:
      The long flag string
    • getShortFlag

      public String getShortFlag()
      Retrieves the single-character mnemonic alias prefix.
      Returns:
      The short flag string