Package freemarker.core
Class BlockScope
java.lang.Object
freemarker.core.AbstractScope
freemarker.core.BaseScope
freemarker.core.BlockScope
- All Implemented Interfaces:
Scope,TemplateHashModel,TemplateHashModelEx,TemplateModel
- Direct Known Subclasses:
LoopContext,MacroContext,MacroInvocationBodyContext
-
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandefinesVariable(String name) freemarker.core.ast.TemplateElementgetBlock()Returns the template of the enclosing scopevoidput(String key, TemplateModel tm) 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
-
Constructor Details
-
BlockScope
-
-
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. -
getBlock
public freemarker.core.ast.TemplateElement getBlock() -
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.)
-