/** * <p>Adds non-option arguments descriptions to the help output.</p> * * <p>This implementation:</p> * <ul> * <li>{@linkplain #findAndRemoveNonOptionsSpec(java.util.Collection) Finds and removes the non-option * arguments descriptor}</li> * <li>{@linkplain #shouldShowNonOptionArgumentDisplay(OptionDescriptor) Decides whether there is * anything to show for non-option arguments}</li> * <li>If there is, {@linkplain #addNonOptionRow(String) adds a header row} and * {@linkplain #addNonOptionRow(String) adds a} * {@linkplain #createNonOptionArgumentsDisplay(OptionDescriptor) non-option arguments description} </li> * </ul> * * @param options descriptors for the configured options of a parser */ protected void addNonOptionsDescription( Collection<? extends OptionDescriptor> options ) { OptionDescriptor nonOptions = findAndRemoveNonOptionsSpec( options ); if ( shouldShowNonOptionArgumentDisplay( nonOptions ) ) { addNonOptionRow( message( "non.option.arguments.header" ) ); addNonOptionRow( createNonOptionArgumentsDisplay( nonOptions ) ); } }
/** * <p>Adds non-option arguments descriptions to the help output.</p> * * <p>This implementation:</p> * <ul> * <li>{@linkplain #findAndRemoveNonOptionsSpec(java.util.Collection) Finds and removes the non-option * arguments descriptor}</li> * <li>{@linkplain #shouldShowNonOptionArgumentDisplay(OptionDescriptor) Decides whether there is * anything to show for non-option arguments}</li> * <li>If there is, {@linkplain #addNonOptionRow(String) adds a header row} and * {@linkplain #addNonOptionRow(String) adds a} * {@linkplain #createNonOptionArgumentsDisplay(OptionDescriptor) non-option arguments description} </li> * </ul> * * @param options descriptors for the configured options of a parser */ protected void addNonOptionsDescription( Collection<? extends OptionDescriptor> options ) { OptionDescriptor nonOptions = findAndRemoveNonOptionsSpec( options ); if ( shouldShowNonOptionArgumentDisplay( nonOptions ) ) { addNonOptionRow( message( "non.option.arguments.header" ) ); addNonOptionRow( createNonOptionArgumentsDisplay( nonOptions ) ); } }