Uses of Interface freemarker.template.TemplateModel (FreeMarker 2.3.23 API)
Date: 2015-07-05

## Uses of Interface
freemarker.template.TemplateModel

- Packages that use TemplateModel
  Package | Description
  --- | ---
  freemarker.core | The seldom used or advanced parts of the fundamental FreeMarker API, compared to `freemarker.template`.
  freemarker.ext.beans | The `default object wrapper` of FreeMarker uses this to expose Java Beans and POJO-s to templates, but it can also be used in itself as a better alternative `ObjectWrapper`.
  freemarker.ext.dom | Exposes DOM XML nodes to templates as easily traversable trees; see in the Manual.
  freemarker.ext.jdom | Deprecated, use W3C DOM (`freemarker.ext.dom`) instead; Exposes JDOM XML nodes to templates.
  freemarker.ext.jsp | Classes for two-way FreeMarker-JSP integration.
  freemarker.ext.jython | Exposes Jython objects to templates.
  freemarker.ext.rhino | Exposes Rhino (ECMAScript) objects to templates.
  freemarker.ext.servlet | Servlet for legacy "Model 2" frameworks that allows using FreeMarker templates instead of JSP as the MVC View (see in the Manual).
  freemarker.ext.util | Various classes used by `freemarker.ext` but might be useful outside it too.
  freemarker.ext.xml | Deprecated, use W3C DOM with `freemarker.ext.dom` instead; Exposes XML from DOM, dom4j or JDOM nodes, uniformly.
  freemarker.template | The fundamental, most commonly used API-s of FreeMarker; start with `Configuration` (see also the Getting Stared in the Manual.)
  freemarker.template.utility | Various classes used by core FreeMarker code but might be useful outside of it too.

- - ### Uses of TemplateModel in freemarker.core

    Classes in freemarker.core that implement TemplateModel
    Modifier and Type | Class and Description
    --- | ---
    `class` | `Environment.Namespace`

    Methods in freemarker.core that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `TemplateModel` | Environment.`getGlobalVariable(String name)` Returns the globally visible variable of the given name (or null).
    `TemplateModel` | Environment.`getLocalVariable(String name)` Returns the loop or macro local variable corresponding to this variable name.
    `TemplateModel` | Environment.`getVariable(String name)` Returns the variable that is visible in this context, or `null` if the variable is not found.

    Methods in freemarker.core with parameters of type TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | Environment.`applyEqualsOperator(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL "==" operator.
    `boolean` | Environment.`applyEqualsOperatorLenient(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL "==" operator, except that if the two types are incompatible, they are treated as non-equal instead of throwing an exception.
    `boolean` | Environment.`applyGreaterThanOperator(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL ">" operator.
    `boolean` | Environment.`applyLessThanOperator(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL "<" operator.
    `boolean` | Environment.`applyLessThanOrEqualsOperator(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL "<" operator.
    `boolean` | Environment.`applyWithGreaterThanOrEqualsOperator(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL ">=" operator.
    `void` | Environment.`setGlobalVariable(String name, TemplateModel model)` Sets a variable that is visible globally.
    `void` | Environment.`setLocalVariable(String name, TemplateModel model)` Sets a local variable (one effective only during a macro invocation).
    `void` | Environment.`setVariable(String name, TemplateModel model)` Sets a variable in the current namespace.

  - ### Uses of TemplateModel in freemarker.ext.beans

    Classes in freemarker.ext.beans that implement TemplateModel
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ArrayModel` A class that will wrap an arbitrary array into `TemplateCollectionModel` and `TemplateSequenceModel` interfaces.
    `class` | `BeanModel` A class that will wrap an arbitrary object into `TemplateHashModel` interface allowing calls to arbitrary property getters and invocation of accessible methods on the object from a template using the `object.foo` to access properties and `object.bar(arg1, arg2)` to invoke methods on it.
    `class` | `BooleanModel` A class that will wrap instances of `Boolean` into a `TemplateBooleanModel`.
    `class` | `CollectionModel` A special case of `BeanModel` that can wrap Java collections and that implements the `TemplateCollectionModel` in order to be usable in a `<#list>` block.
    `class` | `DateModel` Wraps arbitrary subclass of `Date` into a reflective model.
    `class` | `EnumerationModel` A class that adds `TemplateModelIterator` functionality to the `Enumeration` interface implementers.
    `class` | `IteratorModel` A class that adds `TemplateModelIterator` functionality to the `Iterator` interface implementers.
    `class` | `MapModel` A special case of `BeanModel` that adds implementation for `TemplateMethodModelEx` on map objects that is a shortcut for the `Map.get()` method.
    `class` | `NumberModel` Wraps arbitrary subclass of `Number` into a reflective model.
    `class` | `OverloadedMethodsModel` Wraps a set of same-name overloaded methods behind `TemplateMethodModel` interface, like if it was a single method, chooses among them behind the scenes on call-time based on the argument values.
    `class` | `ResourceBundleModel` A hash model that wraps a resource bundle.
    `class` | `SimpleMapModel` Model used by `BeansWrapper` when `simpleMapWrapper` mode is enabled.
    `class` | `SimpleMethodModel` A class that will wrap a reflected method call into a `TemplateMethodModel` interface.
    `class` | `StringModel` Subclass of `BeanModel` that exposes the return value of the `Object.toString()` method through the `TemplateScalarModel` interface.

    Methods in freemarker.ext.beans that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `protected TemplateModel` | BeansModelCache.`create(Object object)`
    `TemplateModel` | SimpleMethodModel.`get(int index)`
    `TemplateModel` | OverloadedMethodsModel.`get(int index)`
    `TemplateModel` | CollectionModel.`get(int index)` Retrieves the i-th object from the collection, wrapped as a TemplateModel.
    `TemplateModel` | ArrayModel.`get(int index)`
    `TemplateModel` | SimpleMapModel.`get(String key)`
    `TemplateModel` | BeanModel.`get(String key)` Uses Beans introspection to locate a property or method with name matching the key name.
    `TemplateModel` | SimpleMapModel.`getAPI()`
    `TemplateModel` | BeanModel.`getAPI()`
    `protected TemplateModel` | BeansWrapper.`getInstance(Object object, ModelFactory factory)` Deprecated. override `BeansWrapper.getModelFactory(Class)` instead. Using this method will now bypass wrapper caching (if it's enabled) and always result in creation of a new wrapper. This method will be removed in 2.4
    `TemplateModel` | HashAdapter.`getTemplateModel()`
    `protected TemplateModel` | ResourceBundleModel.`invokeGenericGet(Map keyMap, Class clazz, String key)` Overridden to invoke the getObject method of the resource bundle.
    `protected TemplateModel` | MapModel.`invokeGenericGet(Map keyMap, Class clazz, String key)` Overridden to invoke the generic get method by casting to Map instead of through reflection - should yield better performance.
    `protected TemplateModel` | BeanModel.`invokeGenericGet(Map keyMap, Class clazz, String key)`
    `TemplateModel` | IteratorModel.`next()` Calls underlying `Iterator.next()` and wraps the result.
    `TemplateModel` | EnumerationModel.`next()` Calls underlying `Enumeration.nextElement()` and wraps the result.
    `TemplateModel` | BeansWrapper.`wrap(Object object)` Wraps the object with a template model that is most specific for the object's class.
    `protected TemplateModel` | BeanModel.`wrap(Object obj)`

    Methods in freemarker.ext.beans with parameters of type TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `void` | BeansWrapper.`setNullModel(TemplateModel nullModel)` Deprecated. Changing the `null` model can cause a lot of confusion; don't do it.
    `Object` | BeansWrapper.`tryUnwrapTo(TemplateModel model, Class targetClass)`
    `Object` | BeansWrapper.`unwrap(TemplateModel model)` Attempts to unwrap a model into underlying object.
    `protected Object` | BeanModel.`unwrap(TemplateModel model)`
    `Object` | BeansWrapper.`unwrap(TemplateModel model, Class targetClass)` Attempts to unwrap a model into an object of the desired class.

  - ### Uses of TemplateModel in freemarker.ext.dom

    Classes in freemarker.ext.dom that implement TemplateModel
    Modifier and Type | Class and Description
    --- | ---
    `class` | `NodeModel` A base class for wrapping a W3C DOM Node as a FreeMarker template model.

    Methods in freemarker.ext.dom that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `TemplateModel` | NodeModel.`exec(List args)`
    `TemplateModel` | XPathSupport.`executeQuery(Object context, String xpathQuery)`
    `TemplateModel` | NodeModel.`get(int i)`
    `TemplateModel` | NodeModel.`get(String key)`

  - ### Uses of TemplateModel in freemarker.ext.jdom

    Classes in freemarker.ext.jdom that implement TemplateModel
    Modifier and Type | Class and Description
    --- | ---
    `class` | `NodeListModel` Deprecated. Use `NodeModel` instead.

    Methods in freemarker.ext.jdom that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `TemplateModel` | NodeListModel.`get(int i)` Deprecated. Retrieves the i-th element of the node list.
    `TemplateModel` | NodeListModel.`get(String key)` Deprecated. Provides node list traversal as well as special functions: filtering by name, filtering by node type, shallow-copying, and duplicate removal.

  - ### Uses of TemplateModel in freemarker.ext.jsp

    Classes in freemarker.ext.jsp that implement TemplateModel
    Modifier and Type | Class and Description
    --- | ---
    `class` | `TaglibFactory` A hash model associated with a servlet context that can load JSP tag libraries associated with that servlet context.

    Methods in freemarker.ext.jsp that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `TemplateModel` | TaglibFactory.`get(String taglibUri)` Retrieves a JSP tag library identified by an URI.

  - ### Uses of TemplateModel in freemarker.ext.jython

    Classes in freemarker.ext.jython that implement TemplateModel
    Modifier and Type | Class and Description
    --- | ---
    `class` | `JythonHashModel` Model for Jython dictionaries (`PyDictionary` and `PyStringMap`).
    `class` | `JythonModel` Generic model for arbitrary Jython objects.
    `class` | `JythonNumberModel` Model for Jython numeric objects (`PyInteger`, `PyLong`, `PyFloat`).
    `class` | `JythonSequenceModel` Model for Jython sequence objects (`PySequence` descendants).

    Methods in freemarker.ext.jython that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `TemplateModel` | JythonSequenceModel.`get(int index)` Returns `PyObject.__finditem__(int)`.
    `TemplateModel` | JythonModel.`get(String key)` Calls `PyObject.__findattr__(java.lang.String)`, then if it returns null calls `PyObject.__finditem__(java.lang.String)`.
    `TemplateModel` | JythonWrapper.`wrap(Object obj)` Wraps the passed Jython object into a FreeMarker template model.

    Methods in freemarker.ext.jython with parameters of type TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `org.python.core.PyObject` | JythonWrapper.`unwrap(TemplateModel model)` Coerces a template model into a `PyObject`.

  - ### Uses of TemplateModel in freemarker.ext.rhino

    Classes in freemarker.ext.rhino that implement TemplateModel
    Modifier and Type | Class and Description
    --- | ---
    `class` | `RhinoFunctionModel`
    `class` | `RhinoScriptableModel`

    Methods in freemarker.ext.rhino that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `TemplateModel` | RhinoScriptableModel.`get(int index)`
    `TemplateModel` | RhinoScriptableModel.`get(String key)`
    `TemplateModel` | RhinoWrapper.`wrap(Object obj)`

  - ### Uses of TemplateModel in freemarker.ext.servlet

    Classes in freemarker.ext.servlet that implement TemplateModel
    Modifier and Type | Class and Description
    --- | ---
    `class` | `AllHttpScopesHashModel` An extension of SimpleHash that looks up keys in the hash, then in the request, session, and servlet context scopes.
    `class` | `HttpRequestHashModel` TemplateHashModel wrapper for a HttpServletRequest attributes.
    `class` | `HttpRequestParametersHashModel` TemplateHashModel wrapper for a HttpServletRequest parameters.
    `class` | `HttpSessionHashModel` TemplateHashModel wrapper for a HttpSession attributes.
    `class` | `IncludePage` A model that when invoked with a 'path' parameter will perform a servlet include.
    `class` | `ServletContextHashModel` TemplateHashModel wrapper for a ServletContext attributes.

    Methods in freemarker.ext.servlet that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `protected TemplateModel` | FreemarkerServlet.`createModel(ObjectWrapper objectWrapper, javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`
    `TemplateModel` | ServletContextHashModel.`get(String key)`
    `TemplateModel` | HttpSessionHashModel.`get(String key)`
    `TemplateModel` | HttpRequestParametersHashModel.`get(String key)`
    `TemplateModel` | HttpRequestHashModel.`get(String key)`
    `TemplateModel` | AllHttpScopesHashModel.`get(String key)`

    Methods in freemarker.ext.servlet with parameters of type TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `void` | IncludePage.`execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body)`
    `protected void` | FreemarkerServlet.`postTemplateProcess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Template template, TemplateModel data)` Called after the execution returns from template.process().
    `protected boolean` | FreemarkerServlet.`preTemplateProcess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Template template, TemplateModel data)` Called before the execution is passed to template.process().
    `void` | AllHttpScopesHashModel.`putUnlistedModel(String key, TemplateModel model)` Stores a model in the hash so that it doesn't show up in `keys()` and `values()` methods.

  - ### Uses of TemplateModel in freemarker.ext.util

    Subinterfaces of TemplateModel in freemarker.ext.util
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `WrapperTemplateModel` A generic interface for template models that wrap some underlying object, and wish to provide access to that wrapped object.

    Methods in freemarker.ext.util that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract TemplateModel` | ModelCache.`create(Object object)`
    `TemplateModel` | ModelFactory.`create(Object object, ObjectWrapper wrapper)` Create a wrapping model for the specified object that belongs to the specified wrapper.
    `TemplateModel` | ModelCache.`getInstance(Object object)`

  - ### Uses of TemplateModel in freemarker.ext.xml

    Methods in freemarker.ext.xml that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `TemplateModel` | NodeListModel.`get(int index)` Deprecated. Selects a single node from this model's nodelist by its list index and returns a new NodeListModel containing that single node.
    `TemplateModel` | NodeListModel.`get(String key)` Deprecated. Returns a new NodeListModel containing the nodes that result from applying an operator to this model's nodes.

  - ### Uses of TemplateModel in freemarker.template

    Subinterfaces of TemplateModel in freemarker.template
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `AdapterTemplateModel` A `TemplateModel` that can be unwrapped and then it considers a provided desired (hint) class.
    `interface` | `TemplateBooleanModel` "boolean" template language data type; same as in Java; either `true` or `false`.
    `interface` | `TemplateCollectionModel` "collection" template language data type: a collection of values that can be enumerated, but can't be or not meant to be accessed by index or key.
    `interface` | `TemplateCollectionModelEx` Experimental - subject to change: "extended collection" template language data type: Adds size/emptiness querybility and "contains" test to `TemplateCollectionModel`.
    `interface` | `TemplateDateModel` "date", "time" and "date-time" template language data types: corresponds to `Date`.
    `interface` | `TemplateDirectiveModel` "directive" template language data type: used as user-defined directives (much like macros) in templates.
    `interface` | `TemplateHashModel` "hash" template language data type: an object that contains other objects accessible through string keys (sub-variable names).
    `interface` | `TemplateHashModelEx` "extended hash" template language data type; extends `TemplateHashModel` by allowing iterating through its keys and values.
    `interface` | `TemplateMethodModel` Deprecated. Use `TemplateMethodModelEx` instead. This interface is from the old times when the only kind of value you could pass in was string.
    `interface` | `TemplateMethodModelEx` "extended method" template language data type: Objects that act like functions.
    `interface` | `TemplateModelWithAPISupport` Experimental - subject to change: A `TemplateModel` on which the `?api` operation can be applied.
    `interface` | `TemplateNodeModel` "node" template language data type: an object that is a node in a tree.
    `interface` | `TemplateNumberModel` "number" template language data type; an object that stores a number.
    `interface` | `TemplateScalarModel` "string" template language data-type; like in Java, an unmodifiable UNICODE character sequence.
    `interface` | `TemplateSequenceModel` "sequence" template language data type; an object that contains other objects accessible through an integer 0-based index.
    `interface` | `TemplateTransformModel` "transform" template language data type: user-defined directives (much like macros) specialized on filtering output; you should rather use the newer `TemplateDirectiveModel` instead.

    Classes in freemarker.template that implement TemplateModel
    Modifier and Type | Class and Description
    --- | ---
    `class` | `DefaultArrayAdapter` Adapts an `array` of a non-primitive elements to the corresponding `TemplateModel` interface(s), most importantly to `TemplateHashModelEx`.
    `class` | `DefaultIteratorAdapter` Adapts an `Iterator` to the corresponding `TemplateModel` interface(s), most importantly to `TemplateCollectionModel`.
    `class` | `DefaultListAdapter` Adapts a `List` to the corresponding `TemplateModel` interface(s), most importantly to `TemplateSequenceModel`.
    `class` | `DefaultMapAdapter` Adapts a `Map` to the corresponding `TemplateModel` interface(s), most importantly to `TemplateHashModelEx`.
    `class` | `DefaultNonListCollectionAdapter` Experimental - subject to change: Adapts a non-`List` Java `Collection` to the corresponding `TemplateModel` interface(s), most importantly to `TemplateCollectionModelEx`.
    `class` | `LocalizedString` An abstract base class for scalars that vary by locale.
    `class` | `ResourceBundleLocalizedString` A concrete implementation of `LocalizedString` that gets a localized string from a `ResourceBundle`
    `class` | `SimpleCollection` A simple implementation of `TemplateCollectionModel`.
    `class` | `SimpleDate` A simple implementation of the `TemplateDateModel` interface.
    `class` | `SimpleHash` A simple implementation of the `TemplateHashModelEx` interface, using its own underlying `Map` or `SortedMap` for storing the hash entries.
    `class` | `SimpleList` Deprecated. Use SimpleSequence instead.
    `class` | `SimpleNumber` A simple implementation of the `TemplateNumberModel` interface.
    `class` | `SimpleScalar` A simple implementation of the `TemplateScalarModel` interface, using a `String`.
    `class` | `SimpleSequence` A simple implementation of the `TemplateSequenceModel` interface, using its own underlying `List` for storing the list items.
    `class` | `TemplateModelListSequence` A sequence that wraps a `List` of `TemplateModel`-s.

    Fields in freemarker.template declared as TemplateModel
    Modifier and Type | Field and Description
    --- | ---
    `static TemplateModel` | TemplateScalarModel.`EMPTY_STRING` A constant value to use as the empty string.
    `static TemplateModel` | TemplateModel.`NOTHING` A general-purpose object to represent nothing.

    Methods in freemarker.template that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `TemplateModel` | TemplateSequenceModel.`get(int index)` Retrieves the i-th template model in this sequence.
    `TemplateModel` | TemplateModelListSequence.`get(int index)`
    `TemplateModel` | SimpleSequence.`get(int index)` Returns the item at the specified index of the list.
    `TemplateModel` | DefaultListAdapter.`get(int index)`
    `TemplateModel` | TemplateHashModel.`get(String key)` Gets a `TemplateModel` from the hash.
    `TemplateModel` | SimpleHash.`get(String key)`
    `TemplateModel` | DefaultMapAdapter.`get(String key)`
    `TemplateModel` | TemplateModelWithAPISupport.`getAPI()` Returns the model that exposes the (Java) API of the value.
    `TemplateModel` | DefaultNonListCollectionAdapter.`getAPI()`
    `TemplateModel` | DefaultMapAdapter.`getAPI()`
    `TemplateModel` | DefaultListAdapter.`getAPI()`
    `TemplateModel` | Configuration.`getSharedVariable(String name)` Gets a shared variable.
    `TemplateModel` | TemplateModelAdapter.`getTemplateModel()`
    `protected TemplateModel` | SimpleObjectWrapper.`handleUnknownType(Object obj)` Called if a type other than the simple ones we know about is passed in.
    `protected TemplateModel` | DefaultObjectWrapper.`handleUnknownType(Object obj)` Called for an object that aren't considered to be of a "basic" Java type, like for an application specific type, or for a W3C DOM node.
    `TemplateModel` | TemplateModelIterator.`next()` Returns the next model.
    `protected TemplateModel` | WrappingTemplateModel.`wrap(Object obj)` Wraps the passed object into a template model using this object's object wrapper.
    `TemplateModel` | ObjectWrapper.`wrap(Object obj)` Makes a `TemplateModel` out of a non-`TemplateModel` object, usually by "wrapping" it into a `TemplateModel` implementation that delegates to the original object.
    `TemplateModel` | DefaultObjectWrapper.`wrap(Object obj)` Wraps the parameter object to `TemplateModel` interface(s).
    `TemplateModel` | DefaultObjectWrapper.`wrapDomNode(Object obj)`

    Methods in freemarker.template with parameters of type TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | TemplateCollectionModelEx.`contains(TemplateModel item)` Tells if a given value occurs in the collection, accodring the rules of the wrapped collection.
    `boolean` | DefaultNonListCollectionAdapter.`contains(TemplateModel item)`
    `void` | TemplateDirectiveModel.`execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body)` Executes this user-defined directive; called by FreeMarker when the user-defined directive is called in the template.
    `void` | Configuration.`setSharedVariable(String name, TemplateModel tm)` Adds a shared variable to the configuration.
    `Object` | ObjectWrapperAndUnwrapper.`tryUnwrapTo(TemplateModel tm, Class targetClass)` Attempts to unwrap a `TemplateModel` to a plain Java object that's the instance of the given class (or is `null`).
    `Object` | ObjectWrapperAndUnwrapper.`unwrap(TemplateModel tm)` Unwraps a `TemplateModel` to a plain Java object.

  - ### Uses of TemplateModel in freemarker.template.utility

    Classes in freemarker.template.utility that implement TemplateModel
    Modifier and Type | Class and Description
    --- | ---
    `class` | `CaptureOutput` Deprecated. Use block-assignments instead, like `<assign x>...</assign>`.
    `class` | `DOMNodeModel` A convenient wrapper class for wrapping a Node in the W3C DOM API.
    `class` | `Execute` Gives FreeMarker the the ability to execute external commands.
    `class` | `HtmlEscape` Performs an HTML escape of a given template fragment.
    `class` | `JythonRuntime` A crude first pass at an embeddable Jython interpreter
    `class` | `NormalizeNewlines` Transformer that supports FreeMarker legacy behavior: all newlines appearing within the transformed area will be transformed into the platform's default newline.
    `class` | `ObjectConstructor` An object that you can make available in a template to instantiate arbitrary beans-wrapped objects in a template.
    `class` | `StandardCompress` A filter that compresses each sequence of consecutive whitespace to a single line break (if the sequence contains a line break) or a single space.
    `class` | `XmlEscape` Performs an XML escaping of a given template fragment.

    Methods in freemarker.template.utility that return TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `TemplateModel` | DOMNodeModel.`get(String key)`

    Methods in freemarker.template.utility with parameters of type TemplateModel
    Modifier and Type | Method and Description
    --- | ---
    `static String` | ClassUtil.`getFTLTypeDescription(TemplateModel tm)` Returns the type description of a value with FTL terms (not plain class name), as it should be used in type-related error messages and for debugging purposes.
    `static Object` | DeepUnwrap.`permissiveUnwrap(TemplateModel model)` Same as `DeepUnwrap.unwrap(TemplateModel)`, but it doesn't throw exception if it doesn't know how to unwrap the model, but rather returns it as-is.
    `static Object` | DeepUnwrap.`premissiveUnwrap(TemplateModel model)` Deprecated. the name of this method is mistyped. Use `DeepUnwrap.permissiveUnwrap(TemplateModel)` instead.
    `static Object` | DeepUnwrap.`unwrap(TemplateModel model)` Unwraps `TemplateModel`-s recursively.