Class UsageHelper


  • public class UsageHelper
    extends java.lang.Object
    • Field Detail

      • DEFAULT_HINT_COMPARATOR

        public static final java.util.Comparator<HelpHint> DEFAULT_HINT_COMPARATOR
        Default comparator for help hints

        Compares by class name of the implementation to give a predictable order in output. Where multiple instances of same implementation hint exists compares by identity hash codes of the instances.

      • DEFAULT_OPTION_COMPARATOR

        public static final java.util.Comparator<OptionMetadata> DEFAULT_OPTION_COMPARATOR
        Default comparator for options

        Compares against the user readable portion of the option name omitting any leading - characters

      • DEFAULT_COMMAND_COMPARATOR

        public static final java.util.Comparator<CommandMetadata> DEFAULT_COMMAND_COMPARATOR
        Default comparator for commands

        Compares by alphabetical ordering

      • DEFAULT_COMMAND_GROUP_COMPARATOR

        public static final java.util.Comparator<CommandGroupMetadata> DEFAULT_COMMAND_GROUP_COMPARATOR
      • DEFAULT_EXIT_CODE_COMPARATOR

        public static final java.util.Comparator<java.util.Map.Entry<java.lang.Integer,​java.lang.String>> DEFAULT_EXIT_CODE_COMPARATOR
        Default comparator for exit codes

        Compares by numerical sorting on the exit codes and then alphabetical sorting on the descriptions

    • Constructor Detail

      • UsageHelper

        public UsageHelper()
    • Method Detail

      • toGroupNames

        public static java.lang.String[] toGroupNames​(java.util.List<CommandGroupMetadata> groupPath)