public interface IContext
Interface implemented by objects containing the context variables needed by the template engine in order to process templates, besides other info like locale or (in web environments) Servlet-API artifacts.
Note a class with this name existed since 1.0, but it was completely reimplemented in Thymeleaf 3.0
Modifier and Type | Method and Description |
---|---|
boolean |
containsVariable(String name)
Checks whether a specific variable is already contained in this context or not.
|
Locale |
getLocale()
Returns the locale that should be used for processing the template.
|
Object |
getVariable(String name)
Retrieve a specific variable, by name.
|
Set<String> |
getVariableNames()
Get a list with all the names of variables contained at this context.
|
Locale getLocale()
Returns the locale that should be used for processing the template.
boolean containsVariable(String name)
Checks whether a specific variable is already contained in this context or not.
name
- the name of the variable to be checked.Set<String> getVariableNames()
Get a list with all the names of variables contained at this context.
Copyright © 2017 The THYMELEAF team. All rights reserved.