/** * Writes all templates to the provided {@link IndentedWriter}. * * @param w the writer to write the template to */ public void writeTemplateMethod(IndentedWriter w) { ensureArgumentsResolved(); for (String s : strings) { w.write(s); } }
/** * Writes all templates to the provided {@link IndentedWriter}. * * @param w the writer to write the template to */ public void writeTemplateMethod(IndentedWriter w) { ensureArgumentsResolved(); for (String s : strings) { w.write(s); } }
public String getDirectTemplateCall() { ensureArgumentsResolved(); return String.format("template.%s(%s)", methodName, getTemplateCallArguments()); }
public String getDirectTemplateCall() { ensureArgumentsResolved(); return String.format("template.%s(%s)", methodName, getTemplateCallArguments()); }
/** * Creates the template method invocation. * * @param w * * @return String the template method call with parameters */ public void writeTemplateCaller(IndentedWriter w) { ensureArgumentsResolved(); w.write("SafeHtml template_%s() {", methodName); w.indent(); w.write("return %s;", getDirectTemplateCall()); w.outdent(); w.write("}"); }
/** * Creates the template method invocation. * * @param w * * @return String the template method call with parameters */ public void writeTemplateCaller(IndentedWriter w) { ensureArgumentsResolved(); w.write("SafeHtml template_%s() {", methodName); w.indent(); w.write("return %s;", getDirectTemplateCall()); w.outdent(); w.write("}"); }