final ITemplateModeHandler templateModeHandler = arguments.getConfiguration().getTemplateModeHandler(templateMode);
final ITemplateWriter templateWriter = templateModeHandler.getTemplateWriter();
if (templateWriter == null) {
throw new ConfigurationException("No template writer defined for template mode \"" + templateMode + "\"");
} else if (!AbstractGeneralTemplateWriter.class.isAssignableFrom(templateWriter.getClass())) {
throw new ConfigurationException("The template writer defined for template mode \"" + templateMode
+ "\" is not an AbstractGeneralTemplateWriter");
}
StringWriter writer = new StringWriter();
try {