Class TemplateNamespace

All Implemented Interfaces:
Scope, TemplateHashModel, TemplateHashModelEx, TemplateModel
Direct Known Subclasses:
IncludedTemplateNamespace

public class TemplateNamespace extends BaseScope
Represents the namespace associated with a template
  • Method Details

    • getTemplate

      public Template getTemplate()
      Description copied from class: AbstractScope
      Returns the template of the enclosing scope
      Specified by:
      getTemplate in interface Scope
      Overrides:
      getTemplate in class AbstractScope
      Returns:
      the template of the enclosing scope
    • put

      public void put(String name, TemplateModel var)
      Description copied from interface: Scope
      Set a variable in this scope. This will typically only be used internally by the FreeMarker engine.
      Specified by:
      put in interface Scope
      Overrides:
      put in class BaseScope
    • definesVariable

      public boolean definesVariable(String name)
      Specified by:
      definesVariable in interface Scope
      Overrides:
      definesVariable in class BaseScope
      Returns:
      whether the variable is defined in this specific scope. (It could be defined in a fallback scope and this method will return false.)