freemarker.template
Interface TemplateScalarModel
- All Superinterfaces:
- TemplateModel
- All Known Implementing Classes:
- CollectionModel, JythonHashModel, JythonModel, JythonNumberModel, JythonSequenceModel, LocalizedString, MapModel, NodeListModel, NodeListModel, ResourceBundleLocalizedString, RhinoFunctionModel, RhinoScriptableModel, SimpleScalar, StringModel
public interface TemplateScalarModel
- extends TemplateModel
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.)
- Version:
- $Id: TemplateScalarModel.java,v 1.18 2004/11/28 12:58:33 ddekany Exp $
Method Summary |
java.lang.String |
getAsString()
Returns the string representation of this model. |
EMPTY_STRING
static final TemplateModel EMPTY_STRING
- A constant value to use as the empty string.
getAsString
java.lang.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.
- Throws:
TemplateModelException