Provides various model implementations for FM-Classic: reflection models, resource bundle model, and singleton boolean models.
Most of the issues dealing with reflection are handled
by the {@link freemarker.ext.beans.BeansWrapper#wrap(Object)}and
{@link freemarker.ext.beans.StaticModel#create(Class)} methods. In normal
cases, these are the only methods you should use to turn an arbitrary Java
object into a FM-Classic TemplateModel. Additionally, you can manually create
instance of any wrapper class using it's getInstance
method
(which canonicalizes instances, meaning you always get the same wrapper
instance for an object), or using the new
operator (which, by definition, always creates a new wrapper).
There are also two classes that are not part of the automatic wrapping implemented by the {@link freemarker.ext.beans.BeansWrapper} class, therefore you must always create their instances manually: the {@link freemarker.ext.beans.RootMapModel} and {@link freemarker.ext.beans.ResourceBundleModel} class.
Note: Unsupported
This package no longer has a maintainer, and needs a lot of work to be
actively maintained. The code is provided as a convenience, but any
bugs encountered cannot be fixed in a timely manner.