/** Sets a new {@code IHelpFactory} to customize the usage help message. * @param helpFactory the new help factory. Must be non-{@code null}. * <p>The specified setting will be registered with this {@code CommandLine} and the full hierarchy of its * subcommands and nested sub-subcommands <em>at the moment this method is called</em>. Subcommands added * later will have the default setting. To ensure a setting is applied to all * subcommands, call the setter last, after adding subcommands.</p> * @return this {@code CommandLine} object, to allow method chaining * @since 3.9 */ public CommandLine setHelpFactory(IHelpFactory helpFactory) { getCommandSpec().usageMessage().helpFactory(helpFactory); for (CommandLine command : getCommandSpec().subcommands().values()) { command.setHelpFactory(helpFactory); } return this; }
/** Sets a new {@code IHelpFactory} to customize the usage help message. * @param helpFactory the new help factory. Must be non-{@code null}. * <p>The specified setting will be registered with this {@code CommandLine} and the full hierarchy of its * subcommands and nested sub-subcommands <em>at the moment this method is called</em>. Subcommands added * later will have the default setting. To ensure a setting is applied to all * subcommands, call the setter last, after adding subcommands.</p> * @return this {@code CommandLine} object, to allow method chaining * @since 3.9 */ public CommandLine setHelpFactory(IHelpFactory helpFactory) { getCommandSpec().usageMessage().helpFactory(helpFactory); for (CommandLine command : getCommandSpec().subcommands().values()) { command.setHelpFactory(helpFactory); } return this; }
/** Returns the {@code IHelpFactory} that this Help was constructed with. * @since 3.9 */ private IHelpFactory getHelpFactory() { return commandSpec.usageMessage().helpFactory(); }
/** Returns the {@code IHelpFactory} that is used to construct the usage help message. * @see #setHelpFactory(IHelpFactory) * @since 3.9 */ public IHelpFactory getHelpFactory() { return getCommandSpec().usageMessage().helpFactory(); }
/** Returns the {@code IHelpFactory} that this Help was constructed with. * @since 3.9 */ private IHelpFactory getHelpFactory() { return commandSpec.usageMessage().helpFactory(); }
/** Returns the {@code IHelpFactory} that is used to construct the usage help message. * @see #setHelpFactory(IHelpFactory) * @since 3.9 */ public IHelpFactory getHelpFactory() { return getCommandSpec().usageMessage().helpFactory(); }