Package | Description |
---|---|
freemarker.core |
This package contains FreeMarker's core parsing/rendering functionality;
most casual users do not need to be aware of the classes in this package,
and can restrict their attention to the
freemarker.template
package. |
freemarker.ext.beans |
Provides model implementations that allow access to arbitrary Java objects.
|
freemarker.ext.servlet |
Provides a generic purpose servlet that generates dynamic response using
FreeMarker.
|
freemarker.template |
This package contains the core API's that most users will use.
|
Modifier and Type | Class and Description |
---|---|
static class |
Configurable.UnknownSettingException |
class |
InvalidReferenceException
A subclass of TemplateException that says there
is no value associated with a given expression.
|
class |
NonBooleanException
A subclass of TemplateException that
indicates that the internals expected an expression
to evaluate to a boolean value and it didn't.
|
class |
NonDateException
Indicates that a date, time or date+time was expected.
|
class |
NonNumericalException
A subclass of TemplateException that
indicates that the internals expected an expression
to evaluate to a numerical value and it didn't.
|
class |
NonStringException
A subclass of TemplateException that
indicates that the internals expected an expression
to evaluate to a string or numeric value and it didn't.
|
class |
StopException
This exception is thrown when a <stop>
directive is encountered.
|
Modifier and Type | Method and Description |
---|---|
protected TemplateException |
Configurable.invalidSettingValueException(java.lang.String name,
java.lang.String value) |
protected TemplateException |
Configurable.unknownSettingException(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
Environment.__setitem__(java.lang.String key,
java.lang.Object o)
A hook that Jython uses.
|
protected void |
DebugBreak.accept(Environment env) |
abstract java.lang.Number |
ArithmeticEngine.add(java.lang.Number first,
java.lang.Number second) |
java.lang.Number |
ArithmeticEngine.ConservativeEngine.add(java.lang.Number first,
java.lang.Number second) |
abstract int |
ArithmeticEngine.compareNumbers(java.lang.Number first,
java.lang.Number second) |
int |
ArithmeticEngine.ConservativeEngine.compareNumbers(java.lang.Number first,
java.lang.Number second) |
abstract java.lang.Number |
ArithmeticEngine.divide(java.lang.Number first,
java.lang.Number second) |
java.lang.Number |
ArithmeticEngine.ConservativeEngine.divide(java.lang.Number first,
java.lang.Number second) |
protected void |
Configurable.doAutoImportsAndIncludes(Environment env) |
TemplateModel |
Expression.getAsTemplateModel(Environment env) |
Environment.Namespace |
Environment.importLib(java.lang.String name,
java.lang.String namespace)
Emulates
import directive, except that name must be tempate
root relative. |
Environment.Namespace |
Environment.importLib(Template loadedTemplate,
java.lang.String namespace)
Emulates
import directive. |
void |
Environment.include(java.lang.String name,
java.lang.String encoding,
boolean parse)
Emulates
include directive, except that name must be tempate
root relative. |
void |
Environment.include(Template includedTemplate)
Processes a Template in the context of this
Environment , including its
output in the Environment 's Writer. |
abstract java.lang.Number |
ArithmeticEngine.modulus(java.lang.Number first,
java.lang.Number second) |
java.lang.Number |
ArithmeticEngine.ConservativeEngine.modulus(java.lang.Number first,
java.lang.Number second) |
abstract java.lang.Number |
ArithmeticEngine.multiply(java.lang.Number first,
java.lang.Number second) |
java.lang.Number |
ArithmeticEngine.ConservativeEngine.multiply(java.lang.Number first,
java.lang.Number second) |
void |
Environment.process()
Processes the template to which this environment belongs.
|
java.lang.Class |
OptInTemplateClassResolver.resolve(java.lang.String className,
Environment env,
Template template) |
java.lang.Class |
TemplateClassResolver.resolve(java.lang.String className,
Environment env,
Template template)
Gets a
Class based on the class name. |
void |
Configurable.setSetting(java.lang.String key,
java.lang.String value)
Sets a setting by a name and string value.
|
void |
Configurable.setSettings(java.io.InputStream propsIn)
Reads a setting list (key and element pairs) from the input stream.
|
void |
Configurable.setSettings(java.util.Properties props)
Set the settings stored in a
Properties object. |
abstract java.lang.Number |
ArithmeticEngine.subtract(java.lang.Number first,
java.lang.Number second) |
java.lang.Number |
ArithmeticEngine.ConservativeEngine.subtract(java.lang.Number first,
java.lang.Number second) |
void |
Environment.visit(TemplateElement element,
TemplateDirectiveModel directiveModel,
java.util.Map args,
java.util.List bodyParameterNames) |
Modifier and Type | Class and Description |
---|---|
class |
InvalidPropertyException
An exception thrown when there is an attempt to access
an invalid bean property when we are in a "strict bean" mode
|
Modifier and Type | Method and Description |
---|---|
void |
IncludePage.execute(Environment env,
java.util.Map params,
TemplateModel[] loopVars,
TemplateDirectiveBody body) |
Modifier and Type | Class and Description |
---|---|
class |
TemplateModelException
Template model implementation classes should throw this exception if
requested data cannot be retrieved.
|
Modifier and Type | Method and Description |
---|---|
void |
TemplateExceptionHandler.handleTemplateException(TemplateException te,
Environment env,
java.io.Writer out)
handle the exception.
|
Modifier and Type | Method and Description |
---|---|
Environment |
Template.createProcessingEnvironment(java.lang.Object rootMap,
java.io.Writer out)
Same as
createProcessingEnvironment(rootMap, out, null) . |
Environment |
Template.createProcessingEnvironment(java.lang.Object rootMap,
java.io.Writer out,
ObjectWrapper wrapper)
Creates a
Environment object,
using this template, the data model provided as the root map object, and
the supplied object wrapper to convert map elements to template models. |
protected void |
Configuration.doAutoImportsAndIncludes(Environment env) |
void |
TemplateDirectiveModel.execute(Environment env,
java.util.Map params,
TemplateModel[] loopVars,
TemplateDirectiveBody body)
Executes this user-defined directive; called by FreeMarker when the user-defined
directive is called in the template.
|
void |
TemplateExceptionHandler.handleTemplateException(TemplateException te,
Environment env,
java.io.Writer out)
handle the exception.
|
void |
Template.process(java.lang.Object rootMap,
java.io.Writer out)
Processes the template, using data from the map, and outputs
the resulting text to the supplied Writer The elements of the
map are converted to template models using the default object wrapper
returned by the
getObjectWrapper()
method of the Configuration. |
void |
Template.process(java.lang.Object rootMap,
java.io.Writer out,
ObjectWrapper wrapper)
Processes the template, using data from the root map object, and outputs
the resulting text to the supplied writer, using the supplied
object wrapper to convert map elements to template models.
|
void |
Template.process(java.lang.Object rootMap,
java.io.Writer out,
ObjectWrapper wrapper,
TemplateNodeModel rootNode)
Processes the template, using data from the root map object, and outputs
the resulting text to the supplied writer, using the supplied
object wrapper to convert map elements to template models.
|
void |
TemplateDirectiveBody.render(java.io.Writer out)
Renders the body of the directive body to the specified writer.
|
void |
Configuration.setSetting(java.lang.String key,
java.lang.String value)
Sets a setting by name and string value.
|