Class UnixStyleUsageFormatter

java.lang.Object
com.beust.jcommander.DefaultUsageFormatter
com.beust.jcommander.UnixStyleUsageFormatter
All Implemented Interfaces:
IUsageFormatter

public class UnixStyleUsageFormatter extends DefaultUsageFormatter
A unix-style usage formatter. This works by overriding and modifying the output of appendAllParametersDetails(StringBuilder, int, String, List) which is inherited from DefaultUsageFormatter.
  • Constructor Details

    • UnixStyleUsageFormatter

      public UnixStyleUsageFormatter(JCommander commander)
  • Method Details

    • appendAllParametersDetails

      public void appendAllParametersDetails(StringBuilder out, int indentCount, String indent, List<ParameterDescription> sortedParameters)
      Appends the details of all parameters in the given order to the argument string builder, indenting every line with indentCount-many indent.
      Overrides:
      appendAllParametersDetails in class DefaultUsageFormatter
      Parameters:
      out - the builder to append to
      indentCount - the amount of indentation to apply
      indent - the indentation
      sortedParameters - the parameters to append to the builder