TemplateCache.MaybeMissingTemplate (FreeMarker 2.3.35 API)
Description: declaration: package: freemarker.cache, class: TemplateCache, class: MaybeMissingTemplate

Package freemarker.cache

# Class TemplateCache.MaybeMissingTemplate

java.lang.Object
freemarker.cache.TemplateCache.MaybeMissingTemplate

Enclosing class:
  TemplateCache

public static final class TemplateCache.MaybeMissingTemplate extends Object
Return value of `TemplateCache.getTemplate(String, Locale, Object, String, boolean)`.

Since:
  2.3.22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getMissingTemplateNormalizedName()`
  When the template was missing, this possibly contains its normalized name.
  `String`
  `getMissingTemplateReason()`
  When the template was missing, this possibly contains the explanation, or `null`.
  `Template`
  `getTemplate()`
  The `Template` if it wasn't missing, otherwise `null`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getTemplate

    public Template getTemplate()
    The `Template` if it wasn't missing, otherwise `null`.

  - ### getMissingTemplateReason

    public String getMissingTemplateReason()
    When the template was missing, this possibly contains the explanation, or `null`. If the template wasn't missing (i.e., when `getTemplate()` return non-`null`) this is always `null`.

  - ### getMissingTemplateNormalizedName

    public String getMissingTemplateNormalizedName()
    When the template was missing, this possibly contains its normalized name. If the template wasn't missing (i.e., when `getTemplate()` return non-`null`) this is always `null`. When the template is missing, it will be `null` for example if the normalization itself was unsuccessful.