Class MissingOptionException

  • All Implemented Interfaces:
    java.io.Serializable

    public class MissingOptionException
    extends ParseException
    Thrown when a required option has not been provided.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List missingOptions
      The list of missing options and groups
      private static long serialVersionUID
      This exception serialVersionUID.
    • Constructor Summary

      Constructors 
      Constructor Description
      MissingOptionException​(java.lang.String message)
      Construct a new MissingSelectedException with the specified detail message.
      MissingOptionException​(java.util.List missingOptions)
      Constructs a new MissingSelectedException with the specified list of missing options.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String createMessage​(java.util.List<?> missingOptions)
      Build the exception message from the specified list of options.
      java.util.List getMissingOptions()
      Gets the list of options or option groups missing in the command line parsed.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        This exception serialVersionUID.
        See Also:
        Constant Field Values
      • missingOptions

        private java.util.List missingOptions
        The list of missing options and groups
    • Constructor Detail

      • MissingOptionException

        public MissingOptionException​(java.util.List missingOptions)
        Constructs a new MissingSelectedException with the specified list of missing options.
        Parameters:
        missingOptions - the list of missing options and groups
        Since:
        1.2
      • MissingOptionException

        public MissingOptionException​(java.lang.String message)
        Construct a new MissingSelectedException with the specified detail message.
        Parameters:
        message - the detail message
    • Method Detail

      • createMessage

        private static java.lang.String createMessage​(java.util.List<?> missingOptions)
        Build the exception message from the specified list of options.
        Parameters:
        missingOptions - the list of missing options and groups
        Since:
        1.2
      • getMissingOptions

        public java.util.List getMissingOptions()
        Gets the list of options or option groups missing in the command line parsed.
        Returns:
        the missing options, consisting of String instances for simple options, and OptionGroup instances for required option groups.
        Since:
        1.2