freemarker.template
Interface TemplateScalarModel
- All Superinterfaces:
- TemplateModel
- All Known Implementing Classes:
- JythonModel, NodeListModel, NodeListModel, SimpleScalar, StringModel
- public interface TemplateScalarModel
- extends TemplateModel
String values in a template data model must implement this interface.
- Version:
- $Id: TemplateScalarModel.java,v 1.15 2003/01/12 23:40:21 revusky Exp $
Method Summary |
java.lang.String |
getAsString()
Returns the string representation of this model. |
EMPTY_STRING
public static final TemplateModel EMPTY_STRING
- A constant value to use as the empty string.
getAsString
public 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