Save This Page
Home » freemarker-2.3.13 » freemarker.template » [javadoc | source]
freemarker.template
public interface: TemplateScalarModel [javadoc | source]

All Implemented Interfaces:
    TemplateModel

All Known Implementing Classes:
    JythonHashModel, AttributeNodeModel, ResourceBundleLocalizedString, DateFormatter, NumberFormatter, JythonModel, CharacterDataNodeModel, urlBIResult, PINodeModel, Match, EmptyStringAndSequence, NodeListModel, SimpleScalar, RhinoScriptableModel, BooleanFormatter, LocalizedString, JythonNumberModel, JythonSequenceModel, NodeListModel, ElementModel, StringModel, CollectionModel, GeneralPurposeNothing, MapModel, RhinoFunctionModel, StringLiteral

String values in a template data model must implement this interface. (Actually, the name of this interface should be TemplateStringModel. The bad name was inherited from the ancient times, when there was only 1 kind of scalars in FreeMarker.)
Field Summary
public  TemplateModel EMPTY_STRING    A constant value to use as the empty string. 
Method from freemarker.template.TemplateScalarModel Summary:
getAsString
Method from freemarker.template.TemplateScalarModel Detail:
 public String getAsString() throws TemplateModelException
    Returns the string representation of this model. In general, avoid returning null. In compatibility mode the engine will convert null into empty string, however in normal mode it will throw an exception if you return null from this method.