if (d.acceptsArguments()) { o.append(" "); if (d.requiresArgument()) {
if (d.acceptsArguments()) { o.append(" "); if (d.requiresArgument()) {
private void addHelpLineFor( OptionDescriptor descriptor ) { if ( descriptor.acceptsArguments() ) { if ( descriptor.requiresArgument() ) addHelpLineWithArgument( descriptor, '<', '>' ); else addHelpLineWithArgument( descriptor, '[', ']' ); } else { addHelpLineFor( descriptor, "" ); } }
private void addHelpLineFor( OptionDescriptor descriptor ) { if ( descriptor.acceptsArguments() ) { if ( descriptor.requiresArgument() ) addHelpLineWithArgument( descriptor, '<', '>' ); else addHelpLineWithArgument( descriptor, '[', ']' ); } else { addHelpLineFor( descriptor, "" ); } }
private void addHelpLineFor( OptionDescriptor descriptor ) { if ( descriptor.acceptsArguments() ) { if ( descriptor.requiresArgument() ) addHelpLineWithArgument( descriptor, '<', '>' ); else addHelpLineWithArgument( descriptor, '[', ']' ); } else { addHelpLineFor( descriptor, "" ); } }
/** * <p>Appends additional info about the given option to the given buffer.</p> * * <p>This implementation:</p> * <ul> * <li>calls {@link #extractTypeIndicator(OptionDescriptor)} for the descriptor</li> * <li>calls {@link joptsimple.OptionDescriptor#argumentDescription()} for the descriptor</li> * <li>if either of the above is present, calls * {@link #appendOptionHelp(StringBuilder, String, String, boolean)}</li> * </ul> * * @param buffer string buffer * @param descriptor a descriptor for a configured option of a parser */ protected void maybeAppendOptionInfo( StringBuilder buffer, OptionDescriptor descriptor ) { String indicator = extractTypeIndicator( descriptor ); String description = descriptor.argumentDescription(); if ( descriptor.acceptsArguments() || !isNullOrEmpty( description ) || descriptor.representsNonOptions() ) { appendOptionHelp( buffer, indicator, description, descriptor.requiresArgument() ); } }
/** * <p>Appends additional info about the given option to the given buffer.</p> * * <p>This implementation:</p> * <ul> * <li>calls {@link #extractTypeIndicator(OptionDescriptor)} for the descriptor</li> * <li>calls {@link joptsimple.OptionDescriptor#argumentDescription()} for the descriptor</li> * <li>if either of the above is present, calls * {@link #appendOptionHelp(StringBuilder, String, String, boolean)}</li> * </ul> * * @param buffer string buffer * @param descriptor a descriptor for a configured option of a parser */ protected void maybeAppendOptionInfo( StringBuilder buffer, OptionDescriptor descriptor ) { String indicator = extractTypeIndicator( descriptor ); String description = descriptor.argumentDescription(); if ( descriptor.acceptsArguments() || !isNullOrEmpty( description ) || descriptor.representsNonOptions() ) { appendOptionHelp( buffer, indicator, description, descriptor.requiresArgument() ); } }