## Uses of Interface
freemarker.template.ObjectWrapper

Packages that use ObjectWrapper
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.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.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 ObjectWrapper in freemarker.core

Methods in freemarker.core that return ObjectWrapper
`ObjectWrapper` Configurable.`getObjectWrapper()` The getter pair of `Configurable.setObjectWrapper(ObjectWrapper)`.

Methods in freemarker.core with parameters of type ObjectWrapper
`void` Configurable.`setObjectWrapper(ObjectWrapper objectWrapper)` Sets the object wrapper used to wrap objects to `TemplateModel`-s.

### Uses of ObjectWrapper in freemarker.ext.beans

Classes in freemarker.ext.beans that implement ObjectWrapper
`class` `BeansWrapper` `ObjectWrapper` that is able to expose the Java API of arbitrary Java objects.

Methods in freemarker.ext.beans that return ObjectWrapper
`ObjectWrapper` BeansWrapperConfiguration.`getOuterIdentity()`
`ObjectWrapper` BeansWrapper.`getOuterIdentity()` By default returns `this`.

Methods in freemarker.ext.beans with parameters of type ObjectWrapper
`void` BeansWrapperConfiguration.`setOuterIdentity(ObjectWrapper outerIdentity)` See `BeansWrapper.setOuterIdentity(ObjectWrapper)`, except here the default is `null` that means the `ObjectWrapper` that you will set up with this `BeansWrapperBuilder` object.
`void` BeansWrapper.`setOuterIdentity(ObjectWrapper outerIdentity)` When wrapping an object, the BeansWrapper commonly needs to wrap "sub-objects", for example each element in a wrapped collection.

### Uses of ObjectWrapper in freemarker.ext.jsp

Methods in freemarker.ext.jsp that return ObjectWrapper
`ObjectWrapper` TaglibFactory.`getObjectWrapper()` See `TaglibFactory.setObjectWrapper(ObjectWrapper)`.

Methods in freemarker.ext.jsp with parameters of type ObjectWrapper
`void` TaglibFactory.`setObjectWrapper(ObjectWrapper objectWrapper)` Sets the `ObjectWrapper` used when building the JSP tag library `TemplateHashModel`-s from the TLD-s.

### Uses of ObjectWrapper in freemarker.ext.jython

Classes in freemarker.ext.jython that implement ObjectWrapper
`class` `JythonWrapper` An object wrapper that wraps Jython objects into FreeMarker template models and vice versa.

### Uses of ObjectWrapper in freemarker.ext.rhino

Classes in freemarker.ext.rhino that implement ObjectWrapper
`class` `RhinoWrapper`

### Uses of ObjectWrapper in freemarker.ext.servlet

Methods in freemarker.ext.servlet that return ObjectWrapper
`protected ObjectWrapper` FreemarkerServlet.`createDefaultObjectWrapper()` Override this to specify what the default `ObjectWrapper` will be when the `object_wrapper` Servlet init-param wasn't specified.
`protected ObjectWrapper` FreemarkerServlet.`createObjectWrapper()` Called from `FreemarkerServlet.init()` to create the `ObjectWrapper`; to customzie this aspect, in most cases you should override `FreemarkerServlet.createDefaultObjectWrapper()` instead.
`ObjectWrapper` HttpRequestHashModel.`getObjectWrapper()`
`protected ObjectWrapper` FreemarkerServlet.`getObjectWrapper()` Should be final; don't override it.

Methods in freemarker.ext.servlet with parameters of type ObjectWrapper
`protected TemplateModel` FreemarkerServlet.`createModel(ObjectWrapper objectWrapper, javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`
`protected TaglibFactory` FreemarkerServlet.`createTaglibFactory(ObjectWrapper objectWrapper, javax.servlet.ServletContext servletContext)` Called to create the `TaglibFactory` once per servlet context.

Constructors in freemarker.ext.servlet with parameters of type ObjectWrapper
Constructor and Description
`AllHttpScopesHashModel(ObjectWrapper wrapper, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request)` Creates a new instance of AllHttpScopesHashModel for handling a single HTTP servlet request.
`HttpRequestHashModel(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ObjectWrapper wrapper)`
`HttpRequestHashModel(javax.servlet.http.HttpServletRequest request, ObjectWrapper wrapper)`
`HttpSessionHashModel(FreemarkerServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ObjectWrapper wrapper)` Use this constructor when the session isn't already created.
`HttpSessionHashModel(javax.servlet.http.HttpSession session, ObjectWrapper wrapper)` Use this constructor when the session already exists.
`ServletContextHashModel(javax.servlet.GenericServlet servlet, ObjectWrapper wrapper)`
`ServletContextHashModel(javax.servlet.ServletContext servletctx, ObjectWrapper wrapper)` Deprecated. use `ServletContextHashModel.ServletContextHashModel(GenericServlet, ObjectWrapper)` instead.

### Uses of ObjectWrapper in freemarker.ext.util

Methods in freemarker.ext.util with parameters of type ObjectWrapper
`TemplateModel` ModelFactory.`create(Object object, ObjectWrapper wrapper)` Create a wrapping model for the specified object that belongs to the specified wrapper.

### Uses of ObjectWrapper in freemarker.template

Subinterfaces of ObjectWrapper in freemarker.template
`interface` `ObjectWrapperAndUnwrapper` Experimental - subject to change: Adds functionality to `ObjectWrapper` that creates a plain Java object from a `TemplateModel`.

Classes in freemarker.template that implement ObjectWrapper
`class` `DefaultObjectWrapper` The default implementation of the `ObjectWrapper` interface.
`class` `SimpleObjectWrapper` A restricted object wrapper that will not expose arbitrary object, just those that directly correspond to the `TemplateModel` sub-interfaces (`String`, `Map` and such).

Fields in freemarker.template declared as ObjectWrapper
`static ObjectWrapper` ObjectWrapper.`BEANS_WRAPPER` Deprecated. Use `BeansWrapperBuilder.build()` instead; this instance isn't read-only and thus can't be trusted.
`static ObjectWrapper` ObjectWrapper.`DEFAULT_WRAPPER` Deprecated. Use `DefaultObjectWrapperBuilder.build()` instead; this instance isn't read-only and thus can't be trusted.
`static ObjectWrapper` ObjectWrapper.`SIMPLE_WRAPPER` Deprecated. No replacement as it was seldom if ever used by anyone; this instance isn't read-only and thus can't be trusted.

Methods in freemarker.template that return ObjectWrapper
`static ObjectWrapper` WrappingTemplateModel.`getDefaultObjectWrapper()` Deprecated. Don't depend on this object, as it can be replace by anybody in the same JVM.
`static ObjectWrapper` Configuration.`getDefaultObjectWrapper(Version incompatibleImprovements)` Returns the default object wrapper for a given "incompatible_improvements" version.
`ObjectWrapper` WrappingTemplateModel.`getObjectWrapper()` Returns the object wrapper instance used by this wrapping template model.

Methods in freemarker.template with parameters of type ObjectWrapper
`static DefaultIteratorAdapter` DefaultIteratorAdapter.`adapt(Iterator iterator, ObjectWrapper wrapper)` Factory method for creating new adapter instances.
`Environment` Template.`createProcessingEnvironment(Object dataModel, Writer out, ObjectWrapper wrapper)` Creates a `Environment` object, using this template, the data-model provided as parameter.
`void` Template.`process(Object dataModel, Writer out, ObjectWrapper wrapper)` Like `Template.process(Object, Writer)`, but overrides the `Configurable.getObjectWrapper()`.
`void` Template.`process(Object dataModel, Writer out, ObjectWrapper wrapper, TemplateNodeModel rootNode)` Like `Template.process(Object, Writer)`, but also sets a (XML-)node to be recursively processed by the template.
`static void` WrappingTemplateModel.`setDefaultObjectWrapper(ObjectWrapper objectWrapper)` Deprecated. This method has VM-wide effect, which makes it unsuitable for application where multiple components might use FreeMarker internally.
`void` WrappingTemplateModel.`setObjectWrapper(ObjectWrapper objectWrapper)`
`void` Configuration.`setObjectWrapper(ObjectWrapper objectWrapper)`

Constructors in freemarker.template with parameters of type ObjectWrapper
Constructor and Description
`MapKeyValuePairIterator(Map<?,?> map, ObjectWrapper objectWrapper)`
`SimpleCollection(Collection collection, ObjectWrapper wrapper)`
`SimpleCollection(Iterator iterator, ObjectWrapper wrapper)`
`SimpleHash(Map map, ObjectWrapper wrapper)` Creates a new hash by shallow-coping (possibly cloning) the underlying map; in many applications you should use `DefaultMapAdapter` instead.
`SimpleHash(ObjectWrapper wrapper)` Creates an empty simple hash using the specified object wrapper.
`SimpleSequence(Collection collection, ObjectWrapper wrapper)` Constructs a simple sequence that will contain the elements from the specified `Collection`; consider using `DefaultListAdapter` instead.
`SimpleSequence(int capacity, ObjectWrapper wrapper)` Constructs an empty simple sequence with preallocated capacity.
`SimpleSequence(ObjectWrapper wrapper)` Constructs an empty sequence using the specified object wrapper.
`WrappingTemplateModel(ObjectWrapper objectWrapper)` Protected constructor that creates a new wrapping template model using the specified object wrapper.

### Uses of ObjectWrapper in freemarker.template.utility

Subinterfaces of ObjectWrapper in freemarker.template.utility
`interface` `ObjectWrapperWithAPISupport` Experimental - subject to change: Implemented by `ObjectWrapper`-s to help `TemplateModel`-s to implement the `someValue?api` operation.
`interface` `RichObjectWrapper` Experimental - subject to change: Union of the interfaces that a typical feature rich `ObjectWrapper` is expected to implement.