Package freemarker.template
This package contains the core API's that most users will use.
The typical usage pattern is to be vended Template
objects by the 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.
-
Interface Summary Interface Description AdapterTemplateModel Supplemental interface that can be implemented by classes that also implement any of theTemplateModelinterfaces.LazilyEvaluatableArguments A marker interface that tells the FreeMarker that the method arguments can be lazily evaluated.ObjectWrapper An object that knows how to "wrap" a java object as a TemplateModel instance.TemplateBooleanModel Objects that will be interpreted as true/false in the appropriate context must implement this interface.TemplateCollectionModel This interface can be implemented by a class to make a variable "foreach-able", i.e.TemplateDateModel Date values in a template data model must implement this interface.TemplateDirectiveBody Represents the body of a directive invocation.TemplateDirectiveModel Objects that implement this interface can be used as user-defined directives (much like macros).TemplateExceptionHandler An API for objects that handle exceptions that are thrown during template rendering.TemplateHashModel Hashes in a data model must implement this interface.TemplateHashModelEx An extended hash interface with a couple of extra hooks.TemplateMethodModel Objects that act as methods in a template data model must implement this interface.TemplateMethodModelEx A subinterface ofTemplateMethodModelthat acts on models, rather than on strings.TemplateModel This is a marker interface that indicates that an object can be put in a template's data model.TemplateModelAdapter Implemented by classes that serve as adapters for template model objects in some other object model.TemplateModelIterator This interface is used to iterate over a set of template models, and is usually returned from an instance ofTemplateCollectionModel.TemplateNodeModel Describes objects that are nodes in a tree.TemplateNumberModel Numeric values in a template data model must implement this interface.TemplateScalarModel String values in a template data model must implement this interface.TemplateSequenceModel List values in a template data model whose elements are accessed by the index operator should implement this interface.TemplateTransformModel Deprecated. UseTemplateDirectiveModelinstead.TransformControl An interface that can be implemented by writers returned fromTemplateTransformModel.getWriter(java.io.Writer, java.util.Map). -
Class Summary Class Description Configuration 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 The default implementation of the ObjectWrapper interface.LocalizedString An abstract base class for scalars that vary by locale.PostParseVisitor A class that visits the AST after the parsing step proper, and makes various checks and adjustments.ResourceBundleLocalizedString A concrete implementation ofLocalizedStringthat gets a localized string from aResourceBundleSimpleCollection A simple implementation ofTemplateCollectionModel.SimpleDate A simple implementation of the TemplateDateModel interface.SimpleHash SimpleList Deprecated. Use SimpleSequence instead.SimpleNumber A simple implementation of the TemplateNumberModel interface.SimpleObjectWrapper The default implementation of the ObjectWrapper interface.SimpleScalar A simple implementation of the TemplateScalarModel interface, using a String.SimpleSequence A convenient implementation of a list.Template A core FreeMarker API that represents a compiled template.TemplateModel.InvalidExpressionModel TemplateModel.JavaNull The type of theTemplateModel.JAVA_NULLobject.TemplateModelListSequence Sequence that wraps ajava.util.Listof already wrapped objects directly, with minimal resource usage.WhitespaceAdjuster WrappingTemplateModel A base class for containers that wrap arbitrary Java objects intoTemplateModelinstances. -
Exception Summary Exception Description Template.WrongEncodingException TemplateException The FreeMarker classes usually use this exception and its descendants to signal FreeMarker specific exceptions.TemplateModelException Template model implementation classes should throw this exception if requested data cannot be retrieved. -
Annotation Types Summary Annotation Type Description Parameters An annotation that indicates what the parameters an FTL transform or method can take.