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

Package freemarker.cache

# Class TemplateLookupResult

java.lang.Object
freemarker.cache.TemplateLookupResult

public abstract class TemplateLookupResult extends Object
The return value of `TemplateLookupStrategy.lookup(TemplateLookupContext)` and similar lookup methods. You usually get one from `TemplateLookupContext.lookupWithAcquisitionStrategy(String)` or `TemplateLookupContext.createNegativeLookupResult()`; you can't create instances of this directly.

Since:
  2.3.22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract String`
  `getTemplateSourceName()`
  The source name of the template found (see `Template.getSourceName()`), or `null` if `isPositive()` is `false`.
  `abstract boolean`
  `isPositive()`
  Tells if the lookup has found a matching template.

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

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

- ## Method Details

  - ### getTemplateSourceName

    public abstract String getTemplateSourceName()
    The source name of the template found (see `Template.getSourceName()`), or `null` if `isPositive()` is `false`.

  - ### isPositive

    public abstract boolean isPositive()
    Tells if the lookup has found a matching template.