code: public Context setTemplate(Template template) {
          checkThread();
          if (template != null) {
              setEngine(template.getEngine());
          }
          this.template = template;
          return this;
      }
docs: Set the current template.
  
  @param template - current template