All Classes
Class
Description
Defines the methods in
CFormat
that are the same for all JSON-like languages.A
TemplateModel
that can be unwrapped and then it considers a provided desired (hint) class.Creates an alias to another format, so that the format can be referred to with a simple name in the template, rather
than as a concrete pattern or other kind of format string.
Creates an alias to another format, so that the format can be referred to with a simple name in the template, rather
than as a concrete pattern or other kind of format string.
An extension of SimpleHash that looks up keys in the hash, then in the
request, session, and servlet context scopes.
An extension of SimpleHash that looks up keys in the hash, then in the
request, session, and servlet context scopes.
Logical "and" operation among the given matchers.
Used for implementing the arithmetic operations and number comparisons in the template language.
This is the default arithmetic engine in FreeMarker.
An arithmetic engine that conservatively widens the operation arguments
to extent that they can hold the result of the operation.
A class that will wrap an arbitrary array into
TemplateCollectionModel
and TemplateSequenceModel
interfaces.Used for the
attempt_exception_reported
configuration setting.A class that will wrap an arbitrary object into
TemplateHashModel
interface allowing calls to arbitrary property getters and invocation 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.ObjectWrapper
that is able to expose the Java API of arbitrary Java objects.Used for
MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)
to store the results; see there.Used for
MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)
as input parameter; see there.Gets/creates a
BeansWrapper
singleton instance that's already configured as specified in the properties of
this object; this is recommended over using the BeansWrapper
constructors.Holds
BeansWrapper
configuration settings and defines their defaults.Blacklist-based member access policy, that is, members that are matched by the listing will not be accessible, all
others will be.
A class that will wrap instances of
Boolean
into a
TemplateBooleanModel
.Represents a breakpoint location consisting of a template name and a line number.
An unexpected state was reached that is certainly caused by a bug in FreeMarker.
Cache storage abstracts away the storage aspects of a cache - associating
an object with a key, retrieval and removal via the key.
A cache storage that has a
getSize()
method for returning the current number of cache entries.Deprecated.
Defines a format (usually a computer language) that's used by the
c
, cn
built-ins, and for the
"c"
and "computer"
number_format
, and
the "c"
boolean_format
.Returned by
MemberAccessPolicy.forClass(Class)
.A
TemplateLoader
that can load templates from the "classpath".A special case of
BeanModel
that can wrap Java collections
and that implements the TemplateCollectionModel
in order to be usable
in a <#list>
block.Deprecated.
Not needed anymore, as FreeMarker now requires higher than Java 1.3
Represents two markup formats nested into each other.
Deprecated.
Will be removed (main method in a library, often classified as CWE-489 "Leftover Debug Code").
Common superclass for implementing
MarkupOutputFormat
-s that use a CommonTemplateMarkupOutputModel
subclass.Common superclass for implementing
TemplateMarkupOutputModel
-s that belong to a
CommonMarkupOutputFormat
subclass format.An optional interface for cache storage that knows whether it can be
concurrently accessible without synchronization.
Returns the given
TemplateConfiguration
directly, or another TemplateConfigurationFactory
's result, when
the specified matcher matches the template source.The setting name was recognized, but its value couldn't be parsed or the setting couldn't be set for some
other reason.
The setting name was not recognized.
The main entry point into the FreeMarker API; encapsulates the configuration settings of FreeMarker,
also serves as a central template-loading and caching service.
Frequently used constant
TemplateModel
values.Represents the CSS output format (MIME type "text/css", name "CSS").
Wraps arbitrary subclass of
Date
into a reflective model.Date and time related utilities.
Used internally by
DateUtil
; don't use its implementations for anything else.Used internally by
DateUtil
; don't use its implementations for
anything else.Non-thread-safe implementation that hard-references a calendar internally.
Non-thread-safe factory that hard-references a calendar internally.
Represents the debugger-side mirror of a debugged
Environment
object in the remote VM.The main debugger interface.
A utility class that allows you to connect to the FreeMarker debugger service
running on a specific host and port.
An interface for components that wish to receive debugging events.
This class provides debugging hooks for the core FreeMarker engine.
Represents the debugger-side mirror of a TemplateModel object, a Template
object, or a Configuration object.
Utility methods for unwrapping
TemplateModel
-s.Adapts an
array
of a non-primitive elements to the corresponding TemplateModel
interface(s), most
importantly to TemplateHashModelEx
.Adapts an
Enumeration
to the corresponding TemplateModel
interface(s), most importantly to
TemplateCollectionModel
.Adapts an
Iterable
to the corresponding TemplateModel
interface(s), most importantly to
TemplateCollectionModel
.Adapts an
Iterator
to the corresponding TemplateModel
interface(s), most importantly to
TemplateCollectionModel
.Adapts a
List
to the corresponding TemplateModel
interface(s), most importantly to
TemplateSequenceModel
.Adapts a
Map
to the corresponding TemplateModel
interface(s), most importantly to
TemplateHashModelEx
.Member access policy to implement the default behavior that's mostly compatible with pre-2.3.30 versions, but is
somewhat safer; it still can't provide safety in practice, if you allow untrusted users to edit templates! Use
WhitelistMemberAccessPolicy
if you need stricter control.Adapts a non-
List
Java Collection
to the corresponding TemplateModel
interface(s), most
importantly to TemplateCollectionModelEx
.The default implementation of the
ObjectWrapper
interface.Gets/creates a
DefaultObjectWrapper
singleton instance that's already configured as specified in the
properties of this object; this is recommended over using the DefaultObjectWrapper
constructors.Holds
DefaultObjectWrapper
configuration settings and defines their defaults.The default
TruncateBuiltinAlgorithm
implementation; see
Configurable.setTruncateBuiltinAlgorithm(TruncateBuiltinAlgorithm)
.Gives information about the place where a directive is called from, also lets you attach a custom data object to that
place.
Deprecated.
Use
NodeModel
insteadA class that adds
TemplateModelIterator
functionality to the
Enumeration
interface implementers.Object that represents the runtime environment during template processing.
Event describing a suspension of an environment (ie because it hit a
breakpoint).
An instance of this class should be registered as a
<listener>
in
the web.xml
descriptor in order to correctly dispatch events to
event listeners that are specified in TLD files.An instance of this class should be registered as a
<listener>
in
the web.xml
descriptor in order to correctly dispatch events to
event listeners that are specified in TLD files.Gives FreeMarker the the ability to execute external commands.
Matches the file extension; unlike other matchers, by default case insensitive.
As opposed to
PathGlobMatcher
, it only compares the "file name" part (the part after the last /
) of
the source name with the given glob.A
TemplateLoader
that uses files inside a specified directory as the source of templates.Returns the first non-
null
result of the child factories, ignoring all further child factories.FreeMarker MVC View servlet that can be used similarly to JSP views.
FreeMarker MVC View servlet that can be used similarly to JSP views.
Deprecated.
This feature is not supported anymore, also, it uses the deprecated default
Configuration
.Deprecated.
This feature is not supported anymore, also, it uses the deprecated default
Configuration
.Deprecated.
Will be removed, as Swing classes aren't accessible on Google App Engine.
Deprecated.
FMPP is a more complete solution.
This is used for wrapping objects that has no special treatment (unlike
Map
-s, Collection
-s,
Number
-s, Boolean
-s, and some more, which have), hence they are just "generic" Java
objects.Performs an HTML escape of a given template fragment.
Represents the HTML output format (MIME type "text/html", name "HTML").
TemplateHashModel wrapper for a HttpServletRequest attributes.
TemplateHashModel wrapper for a HttpServletRequest attributes.
TemplateHashModel wrapper for a HttpServletRequest parameters.
TemplateHashModel wrapper for a HttpServletRequest parameters.
TemplateHashModel wrapper for a HttpSession attributes.
TemplateHashModel wrapper for a HttpSession attributes.
Deprecated.
Use
IdentityHashMap
instead.A model that when invoked with a 'path' parameter will perform a servlet
include.
A model that when invoked with a 'path' parameter will perform a servlet
include.
Used when creating
TemplateDateFormat
-s and TemplateNumberFormat
-s to indicate that the parameters
part of the format string (like some kind of pattern) is malformed.Used when creating
TemplateDateFormat
-s and TemplateNumberFormat
-s to indicate that the format
string (like the value of the dateFormat
setting) is malformed.An exception thrown when there is an attempt to access
an invalid bean property when we are in a "strict bean" mode
A subclass of
TemplateException
that says that an FTL expression has evaluated to null
or it refers
to something that doesn't exist.A class that adds
TemplateModelIterator
functionality to the
Iterator
interface implementers."JavaScript"
CFormat
, to be used when generating JavaScript (and not JSON), except, in most cases
JavaScriptOrJSONCFormat
is recommended over this."JavaScript or JSON"
CFormat
; for generating output that's compatible with both JSON and JavaScript.Represents the JavaScript output format (MIME type "application/javascript", name "JavaScript").
"JSON"
CFormat
; to be used when generating JSON (and not JavaScript), except, in most cases
JavaScriptOrJSONCFormat
is recommended over this.Represents the JSON output format (MIME type "application/json", name "JSON").
Used internally, public for technical reasons only.
Model for Jython dictionaries (
PyDictionary
and PyStringMap
).Generic model for arbitrary Jython objects.
Model for Jython numeric objects (
PyInteger
, PyLong
,
PyFloat
).A crude first pass at an embeddable Jython interpreter
Model for Jython sequence objects (
PySequence
descendants).Functions that has a different implementation depending on the Jython version
used.
An object wrapper that wraps Jython objects into FreeMarker template models
and vice versa.
Legacy blacklist based member access policy, used only to keep old behavior, as it can't provide meaningful safety.
An abstract base class for scalars that vary by locale.
Delegates logger creation to an actual logging library.
Indicates that the template name given was malformed according the
TemplateNameFormat
in use.Implementation of
TemplateHashModelEx2.KeyValuePairIterator
for a TemplateHashModelEx2
that wraps or otherwise uses a
Map
internally.A special case of
BeanModel
that adds implementation
for TemplateMethodModelEx
on map objects that is a shortcut for the
Map.get()
method.Superclass of
OutputFormat
-s that represent a "markup" format, which is any format where certain character
sequences have special meaning, and thus may need escaping.Implement this to restrict what class members (methods, fields, constructors) are accessible from templates.
Superclass for member-selector-list-based member access policies, like
WhitelistMemberAccessPolicy
.A condition that matches some type members.
Returns the merged results of all the child factories.
Used for customizing how the Java methods are visible from templates, via
BeansWrapper.setMethodAppearanceFineTuner(MethodAppearanceFineTuner)
.Adds an extra getter method to
TemplateHashModel
that can return different result than TemplateHashModel.get(String)
,
knowing that the result of it will be called as a method.Thrown by
MethodCallAwareTemplateHashModel.getBeforeMethodCall(String)
; see there.Internally used by various wrapper implementations to implement model
caching.
Interface used to create various wrapper models in the
ModelCache
.A cache storage that implements a two-level Most Recently Used cache.
A
TemplateLoader
that uses a set of other loaders to load the templates.Deprecated.
Use
NodeModel
instead.Deprecated.
Use
NodeModel
instead.A base class for wrapping a single W3C DOM Node as a FreeMarker template model.
Indicates that a
TemplateBooleanModel
value was expected, but the value had a different type.Indicates that a
TemplateDateModel
value was expected, but the value had a different type.Indicates that a
TemplateHashModelEx
value was expected, but the value had a different type.Indicates that a
TemplateNodeModelEx
value was expected, but the value had a different type.Indicates that a
TemplateHashModel
value was expected, but the value had a different type.Indicates that a
TemplateMarkupOutputModel
value was expected, but the value had a different type.Indicates that a
TemplateMethodModel
value was expected, but the value had a different type.Indicates that a
TemplateNodeModel
value was expected, but the value had a different type.Indicates that a
TemplateNumberModel
value was expected, but the value had a different type.Indicates that a
TemplateSequenceModel
value was expected, but the value had a different type.Indicates that a
TemplateSequenceModel
or TemplateCollectionModel
value was expected, but the value
had a different type.Indicates that a
TemplateScalarModel
value was expected (or maybe something that can be automatically coerced
to that), but the value had a different type.Indicates that a
TemplateScalarModel
(or maybe something that can be automatically coerced
to that) or TemplateMarkupOutputModel
value was expected, but the value had a different type.Transformer that supports FreeMarker legacy behavior: all newlines appearing
within the transformed area will be transformed into the platform's default
newline.
Logical "not" operation on the given matcher.
Indicates that an argument that must be non-
null
was null
.A cache storage that doesn't store anything.
A
Writer
that simply drops what it gets.Wraps arbitrary subclass of
Number
into a reflective model.Number- and math-related utilities.
An object that you can make available in a template
to instantiate arbitrary beans-wrapped objects in a template.
Used for the trivial cases of the factory pattern.
Maps Java objects to the type-system of FreeMarker Template Language (see the
TemplateModel
interfaces).Experimental - subject to change: Adds functionality to
ObjectWrapper
that creates a plain Java object
from a TemplateModel
.Experimental - subject to change: Implemented by
ObjectWrapper
-s to help TemplateModel
-s to
implement the someValue?api
operation.A
TemplateClassResolver
that resolves only the classes whose name
was specified in the constructor.Logical "or" operation among the given matchers.
Represents an output format.
Wraps a set of same-name overloaded methods behind
TemplateMethodModel
interface,
like if it was a single method, chooses among them behind the scenes on call-time based on the argument values.Parsing-time exception in a template (as opposed to a runtime exception, a
TemplateException
).Don't implement this interface yourself; use the existing implementation(s).
Thrown when the
TemplateValueFormat
doesn't support parsing, and parsing was invoked.Matches the whole template source name (also known as template source path) with the given glob.
Matches the whole template source name (also known as template source path) with the given regular expression.
Represents the plain text output format (MIME type "text/plain", name "plainText").
A concrete implementation of
LocalizedString
that gets
a localized string from a ResourceBundle
A hash model that wraps a resource bundle.
Experimental - subject to change: Union of the interfaces that a typical feature rich
ObjectWrapper
is
expected to implement.Used by the
DebuggerClient
to create localRepresents the Rich Text Format output format (MIME type "application/rtf", name "RTF").
TemplateHashModel wrapper for a ServletContext attributes.
TemplateHashModel wrapper for a ServletContext attributes.
A simple implementation of
TemplateCollectionModel
.A simple implementation of the
TemplateDateModel
interface.A simple implementation of the
TemplateHashModelEx
interface, using its own underlying Map
or
SortedMap
for storing the hash entries.Deprecated.
Use
SimpleSequence
instead.Model used by
BeansWrapper
when simpleMapWrapper
mode is enabled.A class that will wrap a reflected method call into a
TemplateMethodModel
interface.A simple implementation of the
TemplateNumberModel
interface.A restricted object wrapper that will not expose arbitrary object, just those that directly correspond to the
TemplateModel
sub-interfaces (String
, Map
and such).A simple implementation of the
TemplateScalarModel
interface, using a String
.A simple implementation of the
TemplateSequenceModel
interface, using its own underlying List
for
storing the list items.Marker interface useful when used together with
MethodAppearanceFineTuner
and such customizer objects, to
indicate that it doesn't contain reference to the ObjectWrapper
(so beware with non-static inner
classes) and can be and should be used in call introspection cache keys.Soft cache storage is a cache storage that uses
SoftReference
objects to hold the objects it was passed,
therefore allows the garbage collector to purge the cache when it determines that it wants to free up memory.A filter that compresses each sequence of consecutive whitespace
to a single line break (if the sequence contains a line break) or a
single space.
Interface that can be implemented by
TemplateLoader
-s that maintain some
sort of internal state (i.e.This exception is thrown when a
#stop
directive is encountered.Deprecated.
Use
GenericObjectModel
instead, which implements MethodCallAwareTemplateHashModel
.Some text related utilities.
Used as the argument of
StringUtil.jsStringEnc(String, JsStringEncCompatibility, JsStringEncQuotation)
.Used as the argument of
StringUtil.jsStringEnc(String, JsStringEncCompatibility, JsStringEncQuotation)
.Strong cache storage is a cache storage that simply wraps a
Map
.A hash model associated with a servlet context that can load JSP tag libraries associated with that servlet context.
A hash model associated with a servlet context that can load JSP tag libraries associated with that servlet context.
To search TLD-s under
META-INF/**
/*.tld
inside classpath root containers, that is, in directories
and jar-s that are in the classpath (or are visible for the class loader otherwise).To search TLD-s under
META-INF/**
/*.tld
inside classpath root containers, that is, in directories
and jar-s that are in the classpath (or are visible for the class loader otherwise).When it occurs in the
TaglibFactory.MetaInfTldSource
list, all TaglibFactory.MetaInfTldSource
-s before it will be disabled.When it occurs in the
TaglibFactory.MetaInfTldSource
list, all TaglibFactory.MetaInfTldSource
-s before it will be disabled.A location within which we will look for
META-INF/**
/*.tld
-s.A location within which we will look for
META-INF/**
/*.tld
-s.To search TLD-s under
sevletContext:/WEB-INF/lib/*.{jar,zip}/META-INF/**
/*.tld
, as requested by
the JSP specification.To search TLD-s under
sevletContext:/WEB-INF/lib/*.{jar,zip}/META-INF/**
/*.tld
, as requested by
the JSP specification.Stores an already parsed template, ready to be processed (rendered) for unlimited times, possibly from multiple
threads.
Thrown by the
Template
constructors that specify a non-null
encoding whoch doesn't match the
encoding specified in the #ftl
header of the template.Indicates that the the annotated member can be exposed to templates; if the annotated member will be actually
exposed depends on the
ObjectWrapper
in use, and how that was configured."boolean" template language data type; same as in Java; either
true
or false
.Performs caching and on-demand loading of the templates.
Used for the return value of
TemplateCache.getTemplate(String, Locale, Object, String, boolean)
.Used by built-ins and other template language features that get a class
based on a string.
"collection" template language data type: a collection of values that can be enumerated, but can't be or not meant to
be accessed by index or key, nor the number of elements in it is known.
"collection" template language data type: Adds size/emptiness querybility to
TemplateCollectionModel
.Stores combined markup to be printed; used with
CombinedMarkupOutputFormat
.Used for customizing the configuration settings for individual
Template
-s (or rather groups of templates),
relatively to the common setting values coming from the Configuration
.Creates (or returns)
TemplateConfiguration
-s for template sources.Non-I/O exception thrown by
TemplateConfigurationFactory
-s.Represents a date/time/dateTime format; used in templates for formatting and parsing with that format.
Factory for a certain kind of date/time/dateTime formatting (
TemplateDateFormat
)."date", "time" and "date-time" template language data types: corresponds to
Date
.Represents the nested content of a directive (
TemplateDirectiveModel
) invocation."directive" template language data type: used as user-defined directives
(much like macros) in templates.
Runtime exception in a template (as opposed to a parsing-time exception:
ParseException
).Used for the
template_exception_handler
configuration setting.Utility classes for implementing
TemplateValueFormat
-s."hash" template language data type: an object that contains other objects accessible through string keys
(sub-variable names).
"extended hash" template language data type; extends
TemplateHashModel
by allowing
iterating through its keys and values.Adds key-value pair listing capability to
TemplateHashModelEx
.A key-value pair in a hash; used for
TemplateHashModelEx2.KeyValuePairIterator
.Iterates over the key-value pairs in a hash.
Stores HTML markup to be printed; used with
HTMLOutputFormat
.FreeMarker loads template "files" through objects that implement this interface,
thus the templates need not be real files, and can come from any kind of data source
(like classpath, servlet context, database, etc).
Used as the parameter of
TemplateLookupStrategy.lookup(TemplateLookupContext)
.The return value of
TemplateLookupStrategy.lookup(TemplateLookupContext)
and similar lookup methods.Finds the
TemplateLoader
-level (storage-level) template source for the template name with which the template
was requested (as in Configuration.getTemplate(String)
)."markup output" template language data-type; stores markup (some kind of "rich text" / structured format, as opposed
to plain text) that meant to be printed as template output.
Deprecated.
Use
TemplateMethodModelEx
instead."extended method" template language data type: Objects that act like functions.
The common super-interface of the interfaces that stand for the FreeMarker Template Language (FTL) data types.
Implemented by classes that serve as adapters for template model objects in
some other object model.
ObjectWrapper
-s may throw this when wrapping/unwrapping fails, or TemplateModel
methods throw this
if the requested data can't be retrieved.Used to iterate over a set of template models once; usually returned from
TemplateCollectionModel.iterator()
.A sequence that wraps a
List
of TemplateModel
-s.Static utility method related to
TemplateModel
-s that didn't fit elsewhere.A
TemplateModel
on which the ?api
operation can be applied.Symbolizes a template name format, which defines the basic syntax of names through algorithms such as normalization.
"node" template language data type: an object that is a node in a tree.
A
TemplateNodeModel
that supports navigating to the previous and next sibling nodes.Thrown when
Configuration.getTemplate(String)
(or similar) doesn't find a template.Represents a number format; used in templates for formatting and parsing with that format.
Factory for a certain kind of number formatting (
TemplateNumberFormat
)."number" template language data type; an object that stores a number.
Hooks to monitor as templates run.
Information about the template element that we enter of exit; do NOT implement this (outside FreeMarker), as
new methods can be added to this anytime!
Stores RTF markup to be printed; used with
RTFOutputFormat
."string" template language data-type; like in Java, an unmodifiable UNICODE character sequence.
"sequence" template language data type; an object that contains other objects accessible through an integer 0-based
index.
"transform" template language data type: user-defined directives
(much like macros) specialized on filtering output; you should rather use the newer
TemplateDirectiveModel
instead.Superclass of all value format objects; objects that convert values to strings, or parse strings.
Error while getting, creating or applying
TemplateValueFormat
-s (including its subclasses, like
TemplateNumberFormat
).Superclass of all format factories.
Stores HTML markup to be printed; used with
HTMLOutputFormat
.Stores XML markup to be printed; used with
XMLOutputFormat
.Deprecated.
Will be removed (main method in a library, often classified as CWE-489 "Leftover Debug Code").
Deprecated.
Will be removed (main method in a library, often classified as CWE-489 "Leftover Debug Code").
An interface that can be implemented by writers returned from
TemplateTransformModel.getWriter(java.io.Writer, java.util.Map)
.Used for implementing the "truncate" family of built-ins.
The equivalent of JDK 1.3 UndeclaredThrowableException.
Represents the output format used when the template output format is undecided.
The type of a value differs from what was expected.
Thrown when a
TemplateModel
can't be formatted because of the value/properties of it are outside of that the
TemplateValueFormat
supports.Thrown when a
TemplateDateModel
can't be formatted because its type is TemplateDateModel.UNKNOWN
.Thrown when a string can't be parsed to
TemplateDateModel
, because the provided target type is
TemplateDateModel.UNKNOWN
.Used internally, public for technical reasons only.
Thrown when the content of the string that should be parsed by the
TemplateValueFormat
doesn't match what the
format expects.Indicates that the time zone name is not recognized.
Thrown when FreeMarker runs into a
Number
subclass that it doesn't yet support.This is an abstract template loader that can load templates whose location can be described by an URL.
Wraps a
URL
, and implements methods required for a typical template source.Represents a version number plus the further qualifiers and build info.
A
TemplateLoader
that uses streams reachable through ServletContext.getResource(String)
as its source
of templates.A
TemplateLoader
that uses streams reachable through ServletContext.getResource(String)
as its source
of templates.Whitelist-based member access policy, that is, only members that are matched by the listing will be exposed.
A generic interface for template models that wrap some underlying
object, and wish to provide access to that wrapped object.
Convenience base-class for containers that wrap their contained arbitrary Java objects into
TemplateModel
instances.Implemented by objects that can be made permanently read-only.
Represents the XML output format (MIME type "application/xhtml+xml", name "XHTML"); this behaves identically to
HTMLOutputFormat
, except that the name an the MIME Type differs.Performs an XML escaping of a given template fragment.
Represents the XML output format (MIME type "application/xml", name "XML").
How to show 0 argument non-void public methods to templates.
<assign x>...</assign>
.