void printLineForShortLongArgument(final Argument a,final StringBuilder buffer){
  final Character shortID=a.getShortIdentifier();
  final String longID=a.getLongIdentifier();
  if (shortID != null) {
    if (isUsageArgument(a)) {
      buffer.append("-?, ");
    }
    buffer.append("-");
    buffer.append(shortID.charValue());
    if (a.needsValue() && longID == null) {
      buffer.append(" ");
      buffer.append(a.getValuePlaceholder());
    }
    if (longID != null) {
      final StringBuilder newBuffer=new StringBuilder();
      newBuffer.append(", --");
      newBuffer.append(longID);
      if (a.needsValue()) {
        newBuffer.append(" ");
        newBuffer.append(a.getValuePlaceholder());
      }
      final int currentLength=buffer.length();
      final int lineLength=(buffer.length() - currentLength) + newBuffer.length();
      if (lineLength > MAX_LINE_WIDTH) {
        buffer.append(EOL);
      }
      buffer.append(newBuffer);
    }
    buffer.append(EOL);
  }
 else   if (longID != null) {
    if (isUsageArgument(a)) {
      buffer.append("-?, ");
    }
    buffer.append("--");
    buffer.append(longID);
    if (a.needsValue()) {
      buffer.append(" ");
      buffer.append(a.getValuePlaceholder());
    }
    buffer.append(EOL);
  }
}

void printLineForShortLongArgument ( final Argument a , final StringBuilder buffer ) { final Character shortID = a . getShortIdentifier ( ) ; final String longID = a . getLongIdentifier ( ) ; if ( shortID != null ) { if ( isUsageArgument ( a ) ) { buffer . append ( "-?, " ) ; } buffer . append ( "-" ) ; buffer . append ( shortID . charValue ( ) ) ; if ( a . needsValue ( ) && longID == null ) { buffer . append ( " " ) ; buffer . append ( a . getValuePlaceholder ( ) ) ; } if ( longID != null ) { final StringBuilder newBuffer = new StringBuilder ( ) ; newBuffer . append ( ", --" ) ; newBuffer . append ( longID ) ; if ( a . needsValue ( ) ) { newBuffer . append ( " " ) ; newBuffer . append ( a . getValuePlaceholder ( ) ) ; } final int currentLength = buffer . length ( ) ; final int lineLength = ( buffer . length ( ) - currentLength ) + newBuffer . length ( ) ; if ( lineLength > MAX_LINE_WIDTH ) { buffer . append ( EOL ) ; } buffer . append ( newBuffer ) ; } buffer . append ( EOL ) ; } else if ( longID != null ) { if ( isUsageArgument ( a ) ) { buffer . append ( "-?, " ) ; } buffer . append ( "--" ) ; buffer . append ( longID ) ; if ( a . needsValue ( ) ) { buffer . append ( " " ) ; buffer . append ( a . getValuePlaceholder ( ) ) ; } buffer . append ( EOL ) ; } }
appends a line with the short and / or long identifiers that may be used for the argument to the provided string builder .
