org.jamon.escape.Javascript Maven / Gradle / Ivy
// Autogenerated Jamon proxy
// /Users/jay/jamon/jamon-stdlib/src/main/templates/org/jamon/escape/Javascript.jamon
package org.jamon.escape;
@org.jamon.annotations.Template(
signature = "37F51B74428C548B735886B2E50636B5",
fragmentArguments = {
@org.jamon.annotations.Fragment(
name = "content")})
public class Javascript
extends org.jamon.AbstractTemplateProxy
{
public Javascript(org.jamon.TemplateManager p_manager)
{
super(p_manager);
}
public Javascript()
{
super("/org/jamon/escape/Javascript");
}
protected interface Intf
extends org.jamon.AbstractTemplateProxy.Intf{
public static interface Fragment_content
{
void renderNoFlush(final java.io.Writer jamonWriter)
throws java.io.IOException;
org.jamon.Renderer makeRenderer();
}
void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
}
public static class ImplData
extends org.jamon.AbstractTemplateProxy.ImplData
{
// 1, 1
public void setContent(Fragment_content content)
{
// 1, 1
m_content = content;
}
public Fragment_content getContent()
{
return m_content;
}
private Fragment_content m_content;
}
@Override
protected ImplData makeImplData()
{
return new ImplData();
}
@Override @SuppressWarnings("unchecked") public ImplData getImplData()
{
return (ImplData) super.getImplData();
}
public static interface Fragment_content
extends Intf.Fragment_content
{
}
@Override
public org.jamon.AbstractTemplateImpl constructImpl(Class extends org.jamon.AbstractTemplateImpl> p_class){
try
{
return p_class
.getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
.newInstance(new Object [] { getTemplateManager(), getImplData()});
}
catch (RuntimeException e)
{
throw e;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
@Override
protected org.jamon.AbstractTemplateImpl constructImpl(){
return new JavascriptImpl(getTemplateManager(), getImplData());
}
public org.jamon.Renderer makeRenderer(final Fragment_content content)
{
return new org.jamon.AbstractRenderer() {
@Override
public void renderTo(final java.io.Writer jamonWriter)
throws java.io.IOException
{
render(jamonWriter, content);
}
};
}
public void render(final java.io.Writer jamonWriter, final Fragment_content content)
throws java.io.IOException
{
renderNoFlush(jamonWriter, content);
jamonWriter.flush();
}
public void renderNoFlush(final java.io.Writer jamonWriter, final Fragment_content content)
throws java.io.IOException
{
ImplData implData = getImplData();
implData.setContent(content);
Intf instance = (Intf) getTemplateManager().constructImpl(this);
instance.renderNoFlush(jamonWriter);
reset();
}
}