code: public CompiledTemplate.Factory getTemplateFactory(String name) {
      CompiledTemplate.Factory factory = getTemplateData(name).factory;
      if (factory == null) {
        throw new IllegalArgumentException("cannot get a factory for the private template: " + name);
      }
      return factory;
    }
docs: Returns a factory for the given fully qualified template name.