Create a new Template expression

@param cl type of expression
@param template template
@param args template parameters
@return template expression
322993
public static <T extends Number & Comparable<?>> NumberTemplate<T> numberTemplate(Class<? extends T> cl, String template, List<?> args) {
        return numberTemplate(cl, createTemplate(template), args);
    }
1275042
public static <T extends Enum<T>> EnumTemplate<T> enumTemplate(Class<? extends T> cl, String template, List<?> args) {
        return enumTemplate(cl, createTemplate(template), args);
    }
45488
public static <T extends Comparable<?>> DateTemplate<T> dateTemplate(Class<? extends T> cl, Template template, List<?> args) {
        return new DateTemplate<T>(cl, template, ImmutableList.copyOf(args));
    }
1149586
@Deprecated
    public static <T extends Comparable<?>> ComparableTemplate<T> comparableTemplate(Class<? extends T> cl,
                                                                                     Template template, ImmutableList<?> args) {
        return new ComparableTemplate<T>(cl, template, args);
    }
1038077
public String template(String template, Map<String,Object> data)
            throws ScriptException,ScriptLimitException,SyntaxException{
        return template(null,template,data);
    }
881674
@SuppressWarnings("unchecked")
    public static <T> T[] newArrayInstance(T[] template, int length) {
        return newArrayInstance((Class<T>) template.getClass().getComponentType(), length);
    }
299136
@Deprecated
    public static <T> TemplateExpression<T> template(Class<? extends T> cl, String template, ImmutableList<?> args) {
        return template(cl, TemplateFactory.DEFAULT.create(template), args);
    }
600959
function _createTemplateTree(templates) {
  const tree = {};

  for (const tpl of templates) {
    const parsed = Template.fromFile(tpl).parse();

    for (const [, sectionAttrs] of Object.entries(parsed)) {
      const sectionName = sectionAttrs.name;

      tree[sectionName] = tree[sectionName] || { form: false, options: {}, fields: {} };
      Object.assign(tree[sectionName].options, sectionAttrs.params);
      tree[sectionName].form = tree[sectionName].form || sectionAttrs.keyword === 'form';

      for (const [, fieldAttrs] of Object.entries(sectionAttrs.fields)) {
        const fieldName = fieldAttrs.name;
        tree[sectionName].fields[fieldName] = Object.assign({ type: 'text' }, tree[sectionName].fields[fieldName] || {}, fieldAttrs.params);
      }
    }
  }

  return tree;
}
200823
public static TemplateMetadata fromTemplate(TemplateNode template) {
    TemplateMetadata.Builder builder =
        builder()
            .setTemplateName(template.getTemplateName())
            .setSourceLocation(template.getSourceLocation())
            .setSoyFileKind(SoyFileKind.SRC)
            .setContentKind(template.getContentKind())
            .setStrictHtml(template.isStrictHtml())
            .setDelPackageName(template.getDelPackageName())
            .setVisibility(template.getVisibility())
            .setParameters(Parameter.directParametersFromTemplate(template))
            .setDataAllCallSituations(DataAllCallSituation.fromTemplate(template));
    switch (template.getKind()) {
      case TEMPLATE_BASIC_NODE:
        builder.setTemplateKind(Kind.BASIC);
        break;
      case TEMPLATE_DELEGATE_NODE:
        builder.setTemplateKind(Kind.DELTEMPLATE);
        TemplateDelegateNode deltemplate = (TemplateDelegateNode) template;
        builder.setDelTemplateName(deltemplate.getDelTemplateName());
        builder.setDelTemplateVariant(deltemplate.getDelTemplateVariant());
        break;
      case TEMPLATE_ELEMENT_NODE:
        builder.setTemplateKind(Kind.ELEMENT);
        break;
      default:
        throw new AssertionError("unexpected template kind: " + template.getKind());
    }
    return builder.build();
  }
61735
function(tplname, tplargs, tplloader) {
            tplname = tplname || this.template;
            tplargs = tplargs || _.result(this, "templateContext");
            tplloader = tplloader || _.result(this, "templateLoader");

            var tpl = new Template({
                template: tplname,
                args: tplargs,
                loader: tplloader,
                view: this
            });
            return tpl.render();
        }
458271
public static StringTemplate stringTemplate(String template, Object... args) {
        return stringTemplate(createTemplate(template), ImmutableList.copyOf(args));
    }
1274577
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, String template, Object... args) {
        return dslTemplate(cl, createTemplate(template), ImmutableList.copyOf(args));
    }
292713
def do_template(self,args):
        """"""
        parser = CommandArgumentParser("template")
        args = vars(parser.parse_args(args))

        print "reading template for stack."
        rawStack = self.wrappedStack['rawStack']
        template = AwsConnectionFactory.getCfClient().get_template(StackName=rawStack.name)
        print template['TemplateBody']
24507
public TemplateInstanceExecution templateInstanceExecution(String sourceName, ExpressionEngine expressionEngine) {
        // Transforms each parameter in a name/value pair, using only the source name as input
        Map<String, String> sourceNameInput = Collections.singletonMap("sourceName", sourceName);
        Map<String, String> parameterMap = Maps.transformValues(
                Maps.uniqueIndex(
                        parameters,
                        TemplateParameter::getName
                ),
                parameter -> expressionEngine.render(parameter.getExpression(), sourceNameInput)
        );
        // Concatenates the maps
        Map<String, String> inputMap = new HashMap<>(sourceNameInput);
        inputMap.putAll(parameterMap);
        // Resolves the final expression
        return new TemplateInstanceExecution(
                value -> expressionEngine.render(value, inputMap),
                parameterMap
        );
    }
600034
@Deprecated
    public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, Template template, ImmutableList<?> args) {
        return new DslTemplate<T>(cl, template, args);
    }
1290233
def make_template(name, func, *args, **kwargs):
  """"""
  if args or kwargs:
    func = functools.partial(func, *args, **kwargs)
  return Template(name, func)
1063911
public static BooleanTemplate booleanTemplate(Template template, Object... args) {
        return booleanTemplate(template, ImmutableList.copyOf(args));
    }