Interface UsageFormatter<S extends Source,C>

Type Parameters:
S - the source type
C - the component type

public interface UsageFormatter<S extends Source,C>
Interface for formatting command usage paths into displayable help components. Renamed from UsageDecorator to better reflect its responsibility as a formatter.
  • Method Details

    • format

      @NotNull @NotNull HelpComponent<S,C> format(Command<S> lastOwningCommand, CommandUsage<S> pathway, ExecutionContext<S> context, HelpTheme<S,C> theme)
      Formats a command usage pathway into a help component.
      Parameters:
      lastOwningCommand - the command that owns this usage
      pathway - the usage pathway to format
      context - the execution context
      theme - the help theme
      Returns:
      a formatted help component