public class Context extends AbstractContext
Standard implementation of IContext.
This IContext implementation uses a ContextExecutionInfo object as its
IContextExecutionInfo implementation.
If Thymeleaf is used for the creation of an HTML/XHTML interface in a
web application, an implementation of the IWebContext interface should be
used instead.
EXEC_INFO_VARIABLE_NAME| Constructor and Description |
|---|
Context()
Create an instance without specifying a locale.
|
Context(Locale locale)
Create an instance specifying a locale.
|
Context(Locale locale,
Map<String,?> variables)
Create an instance specifying a locale and an initial set of context
variables.
|
| Modifier and Type | Method and Description |
|---|---|
protected IContextExecutionInfo |
buildContextExecutionInfo(String templateName)
Creates the specific instance of
IContextExecutionInfo to be added
to the context as the execInfo variable. |
addContextExecutionInfo, clearVariables, getLocale, getVariables, setLocale, setVariable, setVariablespublic Context()
Create an instance without specifying a locale. Using this constructor, the default locale (Locale.getDefault()) will be used.
public Context(Locale locale)
Create an instance specifying a locale.
locale - the locale to be used.protected IContextExecutionInfo buildContextExecutionInfo(String templateName)
AbstractContext
Creates the specific instance of IContextExecutionInfo to be added
to the context as the execInfo variable.
buildContextExecutionInfo in class AbstractContexttemplateName - the name of the template being executedCopyright © 2016 The THYMELEAF team. All rights reserved.