Class OptionHandler<T>

    • Field Detail

      • option

        public final OptionDef option
        The annotation.
      • setter

        public final Setter<? super T> setter
        Object to be used for setting value.
      • owner

        public final CmdLineParser owner
        The owner to which this handler belongs to.
    • Method Detail

      • parseArguments

        public abstract int parseArguments​(Parameters params)
                                    throws CmdLineException
        Called if the option that this owner recognizes is found.
        Parameters:
        params - The rest of the arguments. This method can use this object to access the arguments of the option if necessary. The object is valid only during the method call.
        Returns:
        The number of arguments consumed. For example, return 0 if this option doesn't take any parameter.
        Throws:
        CmdLineException
      • getDefaultMetaVariable

        public abstract java.lang.String getDefaultMetaVariable()
        Gets the default meta variable name used to print the usage screen.
        Returns:
        null to hide a meta variable.
      • getMetaVariable

        public final java.lang.String getMetaVariable​(java.util.ResourceBundle rb)
      • getNameAndMeta

        public final java.lang.String getNameAndMeta​(java.util.ResourceBundle rb)