@ SuppressWarnings ( "static-method" ) protected StringConcatenationClient generateAppenderMembers ( String appenderSimpleName , TypeReference builderInterface , String elementAccessor ) { return new StringConcatenationClient ( ) { @ Override protected void appendTo ( TargetStringConcatenation it ) { it . append ( "\tprivate final " ) ; //$NON-NLS-1$ it . append ( builderInterface ) ; it . append ( " builder;" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; it . append ( "\tpublic " ) ; //$NON-NLS-1$ it . append ( appenderSimpleName ) ; it . append ( "(" ) ; //$NON-NLS-1$ it . append ( builderInterface ) ; it . append ( " builder) {" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "\t\tthis.builder = builder;" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "\t}" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; it . append ( "\tpublic void build(" ) ; //$NON-NLS-1$ it . append ( ISourceAppender . class ) ; it . append ( " appender) throws " ) ; //$NON-NLS-1$ it . append ( IOException . class ) ; it . append ( " {" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "\t\tbuild(this.builder." ) ; //$NON-NLS-1$ it . append ( elementAccessor ) ; it . append ( ", appender);" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "\t}" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; } } ; }
Generate the members related to appenders .