Package freemarker.template
Interface TemplateModel
- All Known Subinterfaces:
AdapterTemplateModel,LazilyEvaluatableArguments,Scope,TemplateBooleanModel,TemplateCollectionModel,TemplateDateModel,TemplateDirectiveModel,TemplateHashModel,TemplateHashModelEx,TemplateMethodModel,TemplateMethodModelEx,TemplateNodeModel,TemplateNumberModel,TemplateScalarModel,TemplateSequenceModel,TemplateTransformModel
- All Known Implementing Classes:
AbstractScope,BaseScope,BlockScope,Configuration,Environment,IncludedTemplateNamespace,LocalizedString,LoopContext,MacroContext,MacroInvocationBodyContext,ResourceBundleLocalizedString,SimpleCollection,SimpleDate,SimpleHash,SimpleList,SimpleNumber,SimpleScalar,SimpleSequence,TemplateModel.InvalidExpressionModel,TemplateModel.JavaNull,TemplateModelListSequence,TemplateNamespace
public interface TemplateModel
This is a marker interface that indicates that an object can be put in a template's data model.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TemplateModelA singleton value used to represent the result of an invalid expression, such as 1 - "3"static final TemplateModelA singleton value used to represent a java null which comes from a wrapped Java API, for example, i.e.static final TemplateModelDeprecated.Try not to use this.
-
Field Details
-
NOTHING
Deprecated.Try not to use this.A general-purpose object to represent nothing. It acts as an empty string, false, empty sequence, empty hash, and null-returning method model. It is useful if you want to simulate typical loose scripting language sorts of behaviors in your templates. -
JAVA_NULL
A singleton value used to represent a java null which comes from a wrapped Java API, for example, i.e. is intentional. A null that comes from a generic container like a map is assumed to be unintentional and a result of programming error. -
INVALID_EXPRESSION
A singleton value used to represent the result of an invalid expression, such as 1 - "3"
-