protected void generateMemberAppender ( MemberDescription description ) { if ( description . isTopElement ( ) ) { return ; } final TypeReference appender = description . getElementDescription ( ) . getAppenderType ( ) ; final String generatedFieldAccessor = getGeneratedMemberAccessor ( description ) ; final StringConcatenationClient content = new StringConcatenationClient ( ) { @ Override protected void appendTo ( TargetStringConcatenation it ) { it . append ( "/** Source appender of a " + getLanguageName ( ) //$NON-NLS-1$ + " " + description . getElementDescription ( ) . getName ( ) + "." ) ; //$NON-NLS-1$ //$NON-NLS-2$ it . newLine ( ) ; it . append ( " */" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "@SuppressWarnings(\"all\")" ) ; //$NON-NLS-1$ it . newLine ( ) ; it . append ( "public class " ) ; //$NON-NLS-1$ it . append ( appender . getSimpleName ( ) ) ; it . append ( " extends " ) ; //$NON-NLS-1$ it . append ( getCodeElementExtractor ( ) . getAbstractAppenderImpl ( ) ) ; it . append ( " implements " ) ; //$NON-NLS-1$ it . append ( description . getElementDescription ( ) . getBuilderInterfaceType ( ) ) ; it . append ( " {" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; it . append ( generateAppenderMembers ( appender . getSimpleName ( ) , description . getElementDescription ( ) . getBuilderInterfaceType ( ) , generatedFieldAccessor ) ) ; it . append ( generateMembers ( description , false , true ) ) ; it . append ( "}" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; } } ; final JavaFileAccess javaFile = getFileAccessFactory ( ) . createJavaFile ( appender , content ) ; javaFile . writeTo ( getSrcGen ( ) ) ; }
Generate the member appender .