Class UsageFormatter


  • public class UsageFormatter
    extends Object
    This format the usage text of CLI.
    • Method Detail

      • getInstance

        public static UsageFormatter getInstance()
        Returns an instance of this class.
        Returns:
        an instance of this class.
      • format

        public void format​(CommandManager mgr)
                    throws CLIException
        Prints the usage of CLI.
        Parameters:
        mgr - Command Manager object.
        Throws:
        CLIException - if usage text cannot be presented.
      • format

        public void format​(CommandManager mgr,
                           SubCommand cmd)
                    throws CLIException
        Prints the usage of sub command.
        Parameters:
        mgr - Command Manager object.
        cmd - Sub command object.
        Throws:
        CLIException - if usage text cannot be presented.