Interface CommandLineArguments

All Known Implementing Classes:
AbstractCommandLineArguments

public interface CommandLineArguments
Command line arguments interface for command line tools.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the name of the requested logging configuration file from the command line.
    Get unparsed arguments.
    Get list of property filenames to load.
    boolean
    Indicates the presence of the --ansi option.
    boolean
    Indicates the presence of the --help option.
    boolean
    Indicates the presence of the --quiet option.
    boolean
    Indicates the presence of the --verbose option.
    boolean
    Indicates the presence of the --version option.
    void
    Print default command line help instructions.
    void
    Validate the parameter set.
  • Method Details

    • isVerboseOutput

      boolean isVerboseOutput()
      Indicates the presence of the --verbose option.
      Returns:
      true if the user requested verbose logging.
    • isQuietOutput

      boolean isQuietOutput()
      Indicates the presence of the --quiet option.
      Returns:
      true if the user requested quiet logging.
    • getLoggingConfiguration

      @Nullable String getLoggingConfiguration()
      Gets the name of the requested logging configuration file from the command line.
      Returns:
      the logging configuration file name, or null.
    • isHelp

      boolean isHelp()
      Indicates the presence of the --help option.
      Returns:
      true if the user requested help.
    • isVersion

      boolean isVersion()
      Indicates the presence of the --version option.
      Returns:
      true if the user requested the version be printed
    • isANSI

      boolean isANSI()
      Indicates the presence of the --ansi option.
      Returns:
      true if the user requested the ANSI code option
    • getPropertyFiles

      @Nonnull @Unmodifiable @NotLive List<String> getPropertyFiles()
      Get list of property filenames to load.
      Returns:
      property filenames
    • getOtherArgs

      @Nonnull @Unmodifiable @NotLive List<String> getOtherArgs()
      Get unparsed arguments.
      Returns:
      unparsed arguments
    • validate

      void validate() throws IllegalArgumentException
      Validate the parameter set.
      Throws:
      IllegalArgumentException - if the parameters are invalid
    • printHelp

      void printHelp(@Nonnull PrintStream out)
      Print default command line help instructions.
      Parameters:
      out - location where to print the output