protected void generateExpressionAppender ( ) { final TypeReference builderInterface = getExpressionBuilderInterface ( ) ; final TypeReference appender = getCodeElementExtractor ( ) . getElementAppenderImpl ( "Expression" ) ; //$NON-NLS-1$ final StringConcatenationClient content = new StringConcatenationClient ( ) { @ Override protected void appendTo ( TargetStringConcatenation it ) { it . append ( "/** Builder of a " + getLanguageName ( ) //$NON-NLS-1$ + " XExpression." ) ; //$NON-NLS-1$ 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 ( builderInterface ) ; it . append ( " {" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; it . append ( generateAppenderMembers ( appender . getSimpleName ( ) , builderInterface , "getXExpression()" ) ) ; //$NON-NLS-1$ it . append ( generateMembers ( false , true ) ) ; it . append ( "}" ) ; //$NON-NLS-1$ it . newLineIfNotEmpty ( ) ; it . newLine ( ) ; } } ; final JavaFileAccess javaFile = getFileAccessFactory ( ) . createJavaFile ( appender , content ) ; javaFile . writeTo ( getSrcGen ( ) ) ; }
Generate the expression appender .