Class DefaultUsageFormatter

java.lang.Object
com.github.hypfvieh.cli.parser.formatter.DefaultUsageFormatter
All Implemented Interfaces:
IUsageFormatter

public class DefaultUsageFormatter extends Object implements IUsageFormatter
Default usage formatter used when no other formatter was specified
Since:
1.0.0 - 2022-05-05
Author:
David M., Markus S.
  • Constructor Details

    • DefaultUsageFormatter

      public DefaultUsageFormatter()
  • Method Details

    • format

      public String format(List<CmdArgOption<?>> _options, String _longOptPrefix, String _shortOptPrefix, String _mainClassName)
      Description copied from interface: IUsageFormatter
      Called to retrieve a formatted usage output.

      Output should be properly formatted including line-feeds etc.

      Specified by:
      format in interface IUsageFormatter
      Parameters:
      _options - registered options, maybe empty - never null
      _longOptPrefix - prefix for long options
      _shortOptPrefix - prefix for short options
      _mainClassName - main class name, maybe null
      Returns:
      formatted String