Search in sources :

Example 1 with TemplateClass

use of org.rythmengine.internal.compiler.TemplateClass in project actframework by actframework.

the class RythmTemplate method template.

private org.rythmengine.template.ITemplate template(Map<String, Object> renderArgs) {
    if (inline) {
        TemplateClassManager tcm = engine.classes();
        TemplateClass tc = tcm.getByTemplate(literal);
        if (null == tc) {
            tc = new TemplateClass(literal, engine, BasicRythm.INSTANCE);
        }
        ITemplate t = tc.asTemplate(engine);
        t.__setRenderArgs(renderArgs);
        return t;
    } else {
        return engine.getTemplate(literal, renderArgs);
    }
}
Also used : TemplateClass(org.rythmengine.internal.compiler.TemplateClass) ITemplate(org.rythmengine.template.ITemplate) TemplateClassManager(org.rythmengine.internal.compiler.TemplateClassManager)

Aggregations

TemplateClass (org.rythmengine.internal.compiler.TemplateClass)1 TemplateClassManager (org.rythmengine.internal.compiler.TemplateClassManager)1 ITemplate (org.rythmengine.template.ITemplate)1