Declares a template type name. Template type names are described using the
{@code @template} annotation.

@param newTemplateTypeName the template type name.
548939
boolean declareTemplateTypeName(String newTemplateTypeName) {
    lazyInitInfo();

    if (isTypeTransformationName(newTemplateTypeName) || hasTypedefType()) {
      return false;
    }
    if (info.templateTypeNames == null){
      info.templateTypeNames = new ArrayList<>();
    } else if (info.templateTypeNames.contains(newTemplateTypeName)) {
      return false;
    }

    info.templateTypeNames.add(newTemplateTypeName);
    return true;
  }
200176
public void registerTemplateEngine(Class<? extends TemplateEngine> engineClass) {
        if (templateEngine != null) {
            log.debug("Template engine already registered, ignoring '{}'", engineClass.getName());
            return;
        }

        try {
            TemplateEngine engine = engineClass.newInstance();
            setTemplateEngine(engine);
        } catch (Exception e) {
            throw new PippoRuntimeException(e, "Failed to instantiate '{}'", engineClass.getName());
        }
    }
8104
public final void setTemplate() {
        template = new HashMap();
        if (isEventExist()) {
            template.putAll(events.get(next));
        }
        template.put("event", eventType);
    }
806041
protected void setInnerName(String innerName) {

        m_innerName = innerName;
        if (m_innerName != null) {
            m_typeName = createTypeName(innerName);
        }
    }
586644
function(typeName, template){
    if (!(template instanceof ValueTemplate)){
      template = ValueTemplate.parse(template, {namespace:this});
    }
    class UserDefinedTemplate extends ValueTemplate{
      constructor(defaultValue, validator){
        super(typeName, defaultValue, validator);
        this.template = template;
      }

      validate(value, options){
        return this.template.validate(value, options);
      }
    }
    this.names[typeName] = UserDefinedTemplate;
    return this;
  }
538596
public static <T> TemplateExpression<T> template(Class<? extends T> cl, String template, List<?> args) {
        return template(cl, TemplateFactory.DEFAULT.create(template), args);
    }
1142204
protected boolean isTemplateContextCompatible(CmsTemplateContext templateContext) {

        Set<String> contextKeys = new HashSet<String>(templateContext.getProvider().getAllContexts().keySet());
        return contextKeys.equals(new HashSet<String>(TYPES));
    }
496611
public Context setTemplate(Template template) {
        checkThread();
        if (template != null) {
            setEngine(template.getEngine());
        }
        this.template = template;
        return this;
    }
451071
public void setType(String typeName) {

        try {
            try {
                m_resourceBuilder.setType(OpenCms.getResourceManager().getResourceType(typeName));
            } catch (@SuppressWarnings("unused") CmsLoaderException e) {
                // TODO: what happens if the resource type is a specialized folder and is not configured??
                try {
                    m_resourceBuilder.setType(
                        OpenCms.getResourceManager().getResourceType(CmsResourceTypePlain.getStaticTypeName()));
                } catch (@SuppressWarnings("unused") CmsLoaderException e1) {
                    // this should really never happen
                    m_resourceBuilder.setType(
                        OpenCms.getResourceManager().getResourceType(CmsResourceTypePlain.getStaticTypeName()));
                }
            }
            if (m_resourceBuilder.getType().isFolder()) {
                // ensure folders end with a "/"
                if (!CmsResource.isFolder(m_destination)) {
                    m_destination += "/";
                }
            }
        } catch (Throwable e) {
            setThrowable(e);
        }
    }
111602
public void registerTemplate(ITemplate template) {
        //TemplateResourceManager rm = resourceManager();
        String name;
        if (template instanceof JavaTagBase) {
            name = template.__getName();
        } else {
            name = template.__getTemplateClass(false).getTagName();
        }
        registerTemplate(name, template);
    }
1234357
public TemplateTypeMap createTemplateTypeMap(
      ImmutableList<TemplateType> templateKeys,
      ImmutableList<JSType> templateValues) {
    if (templateKeys == null) {
      templateKeys = ImmutableList.of();
    }
    if (templateValues == null) {
      templateValues = ImmutableList.of();
    }
    return (templateKeys.isEmpty() && templateValues.isEmpty())
        ? emptyTemplateTypeMap
            : new TemplateTypeMap(this, templateKeys, templateValues);
  }
1004386
def register_type_name(t, name):
    
    assert isinstance(t, type)
    assert isinstance(name, unicode)
    __type_names[t] = name
22866
@SuppressWarnings("unchecked")
    protected Class<? extends Annotation> annotationTypeForName(String name) {
        try {
            return (Class<? extends Annotation>) resourceLoader.classForName(name);
        } catch (ResourceLoadingException cnfe) {
            return DUMMY_ANNOTATION;
        }
    }
646909
public void templateNameVerification(String expectedName)
			throws SyntaxException {

		if (!name.equals(expectedName)) {
			throw SyntaxException.create(null, source, MSG_MISNAMED_TPL,
					expectedName);
		}
	}
744841
public void setMonthTypeFace(String fontName) {
        mMonthTypeFace = Typeface.createFromAsset(mContext.getAssets(), "fonts/" + fontName);
        mMonthTypeFaceSet = true;
    }
411511
public static <T> TemplateExpression<T> template(Class<? extends T> cl, String template, Object... args) {
        return template(cl, TemplateFactory.DEFAULT.create(template), ImmutableList.copyOf(args));
    }
537946
public final void setTypeName(final String typeName) {
        if (typeName == null) {
            type = LOOKING_AT;
        } else if (typeName.equalsIgnoreCase(TYPES[0])) {
            type = MATCHES;
        } else if (typeName.equalsIgnoreCase(TYPES[1])) {
            type = LOOKING_AT;
        } else if (typeName.equalsIgnoreCase(TYPES[2])) {
            type = FIND;
        }
    }