Class<?> clazz = parseClass(resource, root, defVariableTypes, true, 0);
streamTemplate = (Template) clazz.getConstructor(Engine.class, Interceptor.class, Compiler.class, Switcher.class, Switcher.class, Filter.class, Formatter.class, Converter.class, Converter.class, Map.class, Map.class, Resource.class, Template.class, Node.class)
.newInstance(engine, interceptor, compiler, valueFilterSwitcher, formatterSwitcher, valueFilter, formatter, mapConverter, outConverter, functions, importMacroTemplates, resource, null, root);
}
if (writerTemplate != null && streamTemplate != null) {
return new AdaptiveTemplate(writerTemplate, streamTemplate, outConverter);
} else if (streamTemplate != null) {
return streamTemplate;
} else {
return writerTemplate;
}