Package freemarker.core
Class TemplateNamespace
java.lang.Object
freemarker.core.AbstractScope
freemarker.core.BaseScope
freemarker.core.TemplateNamespace
- All Implemented Interfaces:
Scope,TemplateHashModel,TemplateHashModelEx,TemplateModel
- Direct Known Subclasses:
IncludedTemplateNamespace
Represents the namespace associated with a template
-
Nested Class Summary
Nested classes/interfaces inherited from interface freemarker.template.TemplateModel
TemplateModel.InvalidExpressionModel, TemplateModel.JavaNull -
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
INVALID_EXPRESSION, JAVA_NULL, NOTHING -
Method Summary
Modifier and TypeMethodDescriptionbooleandefinesVariable(String name) Returns the template of the enclosing scopevoidput(String name, TemplateModel var) Set a variable in this scope.Methods inherited from class freemarker.core.BaseScope
clear, get, getDirectVariableNames, isEmpty, keys, remove, size, valuesMethods inherited from class freemarker.core.AbstractScope
getEnclosingScope, getEnvironment, resolveVariable
-
Method Details
-
getTemplate
Description copied from class:AbstractScopeReturns the template of the enclosing scope- Specified by:
getTemplatein interfaceScope- Overrides:
getTemplatein classAbstractScope- Returns:
- the template of the enclosing scope
-
put
Description copied from interface:ScopeSet a variable in this scope. This will typically only be used internally by the FreeMarker engine. -
definesVariable
- Specified by:
definesVariablein interfaceScope- Overrides:
definesVariablein classBaseScope- Returns:
- whether the variable is defined in this specific scope. (It could be defined in a fallback scope and this method will return false.)
-