private static void bodyWithConcatenation ( SourceBuilder code , Map < Property , PropertyCodeGenerator > generatorsByProperty , String typename ) { code . add ( " return \"%s{" , typename ) ; String prefix = "" ; for ( Property property : generatorsByProperty . keySet ( ) ) { PropertyCodeGenerator generator = generatorsByProperty . get ( property ) ; code . add ( "%s%s=\" + %s + \"" , prefix , property . getName ( ) , ( Excerpt ) generator :: addToStringValue ) ; prefix = ", " ; } code . add ( "}\";%n" ) ; }
Generate the body of a toString method that uses plain concatenation .