String str= context.evaluate(template).getString();
TemplateBuffer buffer= context.evaluate(template); if (buffer == null) return null; String str= buffer.getString();
	public static String getMethodBodyContent(boolean isConstructor, IJavaProject project, String destTypeName, String methodName, String bodyStatement) throws CoreException {		String templateName= isConstructor ? CodeTemplates.CONSTRUCTORSTUB : CodeTemplates.METHODSTUB;		Template template= CodeTemplates.getCodeTemplate(templateName);		if (template == null) {			return bodyStatement;		}		CodeTemplateContext context= new CodeTemplateContext(template.getContextTypeName(), project, String.valueOf('\n'), 0);		context.setVariable(CodeTemplateContextType.ENCLOSING_METHOD, methodName);		context.setVariable(CodeTemplateContextType.ENCLOSING_TYPE, destTypeName);		context.setVariable(CodeTemplateContextType.BODY_STATEMENT, bodyStatement);		String str= context.evaluate(template).getString();		if (Strings.containsOnlyWhitespaces(str)) {			if (Strings.containsOnlyWhitespaces(bodyStatement)) {				return null;			}			return bodyStatement;		}		return str;	}