freemarker.template |
This package contains the core API's that most users will use.
The typical usage pattern is to be vended {@link freemarker.template.Template}
objects by the {@link freemarker.template.Configuration} object.
The Template class represents a template file compiled into an efficient
data structure for later use. Processing of compiled templates is very fast.
For complete instructions on how to use this package, please see
the manual.
|
Java Source File Name | Type | Comment |
AdapterTemplateModel.java | Interface | Supplemental interface that can be implemented by classes that also implement
any of the
TemplateModel interfaces. |
Configuration.java | Class | Main entry point into the FreeMarker API, this class encapsulates the
various configuration parameters with which FreeMarker is run, as well
as serves as a central template loading and caching point. |
DefaultObjectWrapper.java | Class | The default implementation of the ObjectWrapper
interface. |
EmptyMap.java | Class | |
GeneralPurposeNothing.java | Class | Singleton object representing nothing, used by ?if_exists built-in. |
LocalizedString.java | Class | An abstract base class for scalars that vary by locale. |
ObjectWrapper.java | Interface | An object that knows how to "wrap" a java object
as a TemplateModel instance. |
ResourceBundleLocalizedString.java | Class | |
SettingStringParser.java | Class | Helper class for parsing setting values given with string. |
SimpleCollection.java | Class | A simple implementation of
TemplateCollectionModel .
It's able to wrap java.util.Iterator-s and java.util.Collection-s.
If you wrap an Iterator, the variable can be <list>-ed (<forach>-ed) only once!
Consider using
SimpleSequence instead of this class if you want to wrap Iterators.
SimpleSequence will read all elements of the Iterator, and store them in a List
(this may cause too high resource consumption in some applications), so you can list the variable
for unlimited times. |
SimpleDate.java | Class | A simple implementation of the TemplateDateModel
interface. |
SimpleHash.java | Class | A simple implementation of the TemplateHashModelEx
interface, using an underlying
Map or
SortedMap .
This class is thread-safe if you don't call the put or remove methods
after you have made the object available for multiple threads. |
SimpleList.java | Class | This is a trivial subclass that exists for backward compatibility
with the SimpleList from FreeMarker Classic. |
SimpleNumber.java | Class | A simple implementation of the TemplateNumberModel
interface. |
SimpleObjectWrapper.java | Class | The default implementation of the ObjectWrapper
interface. |
SimpleScalar.java | Class | A simple implementation of the TemplateScalarModel
interface, using a String. |
SimpleSequence.java | Class | A convenient implementation of a list. |
Template.java | Class | A core FreeMarker API that represents a compiled template.
Typically, you will use a
Configuration object to instantiate a template.
Configuration cfg = new Configuration();
...
Template myTemplate = cfg.getTemplate("myTemplate.html");
However, you can also construct a template directly by passing in to
the appropriate constructor a java.io.Reader instance that is set to
read the raw template text. |
TemplateBooleanModel.java | Interface | Objects that will be interpreted as true/false in the appropriate
context must implement this interface. |
TemplateCollectionModel.java | Interface | This interface can be implemented by a class to make a variable "foreach-able",
i.e. |
TemplateDateModel.java | Interface | Date values in a template data model must implement this interface.
Contrary to Java, FreeMarker actually distinguishes values that represent
only a time, only a date, or a combined date and time. |
TemplateException.java | Class | The FreeMarker classes usually use this exception and its descendants to
signal FreeMarker specific exceptions. |
TemplateExceptionHandler.java | Interface | An API for objects that handle exceptions that are thrown during
template rendering. |
TemplateHashModel.java | Interface | Hashes in a data model must implement this interface. |
TemplateHashModelEx.java | Interface | An extended hash interface with a couple of extra hooks. |
TemplateMethodModel.java | Interface | Objects that act as methods in a template data model must implement this
interface. |
TemplateMethodModelEx.java | Interface | A subinterface of
TemplateMethodModel that acts on models, rather
than on strings. |
TemplateModel.java | Interface | This is a marker interface that indicates that an object
can be put in a template's data model. |
TemplateModelAdapter.java | Interface | Implemented by classes that serve as adapters for template model objects in
some other object model. |
TemplateModelException.java | Class | Template model implementation classes should throw this exception if
requested data cannot be retrieved. |
TemplateModelIterator.java | Interface | This interface is used to iterate over a set of template models, and is usually
returned from an instance of
TemplateCollectionModel . |
TemplateModelListSequence.java | Class | Sequence that wraps a java.util.List of already wrapped objects
directly, with minimal resource usage. |
TemplateNodeModel.java | Interface | Describes objects that are nodes in a tree.
If you have a tree of objects, they can be recursively
visited using the <#visit...> and <#recurse...>
FTL directives. |
TemplateNumberModel.java | Interface | Numeric values in a template data model must implement this interface. |
TemplateScalarModel.java | Interface | String values in a template data model must implement this interface.
(Actually, the name of this interface should be
TemplateStringModel . |
TemplateSequenceModel.java | Interface | List values in a template data model whose elements are accessed by the
index operator should implement this interface. |
TemplateTransformModel.java | Interface | Objects that implement this interface can be used in a <transform>
block to perform arbitrary transformations on a part of the template
processing output.
Note that, as of FreeMarker 2.1, TemplateTransform Model
has changed. |
TransformControl.java | Interface | An interface that can be implemented by writers returned from
TemplateTransformModel.getWriter(java.io.Writerjava.util.Map) . |
WrappingTemplateModel.java | Class | A base class for containers that wrap arbitrary Java objects into
TemplateModel instances. |