|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
ArrayModel | A class that will wrap an arbitrary array into TemplateCollectionModel ,
TemplateSequenceModel , and TemplateHashModel interfaces. |
BeanModel | A class that will wrap an arbitrary object into
TemplateHashModel interface allowing calls to arbitrary property getters
and invokation 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. |
BeansWrapper | Utility class that provides generic services to reflection classes. |
BooleanScalar | Provides singleton template models for representing boolean values. |
CollectionModel | A special case of BeanModel that can wrap Java collections
and that implements the TemplateCollectionModel in order to be iterable
in a <list> block. |
EnumerationModel | A class that adds TemplateModelIterator functionality to the
Enumeration interface implementers. |
IteratorModel | A class that adds TemplateModelIterator functionality to the
Iterator interface implementers. |
MapModel | A special case of BeanModel that adds implementation
for TemplateMethodModelEx on map objects that is a shortcut for the
Map.get() method. |
Models | Various predefined singleton models. |
NumberModel | Wraps arbitrary subclass of Number into a reflective model. |
ResourceBundleModel | A hash model that wraps a resource bundle. |
RootMapModel | A wrapper for an arbitrary map that will expose it as a TemplateModelRoot . |
StaticModel | Wraps the static fields and methods of a class in a TemplateHashModel . |
StaticModels | Utility class for instantiating StaticModel instances from
templates. |
Provides model implementations that allow access to arbitrary Java objects.
Most of the issues dealing with beans are handled
by the BeansWrapper.wrap(Object)
and
StaticModel.create(Class)
methods. In normal
cases, these are the only methods you should use to turn an arbitrary Java
object into a FreeMarker 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). The
only exception to this is the RootMapModel
,
whose instances should always be created manually since it is a somewhat
special purpose clas.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |