public interface TemplateScalarModel extends TemplateModel
TemplateStringModel
. The misnomer is inherited from the
old times, when this was the only single-value type in FreeMarker.)Modifier and Type | Field and Description |
---|---|
static TemplateModel |
EMPTY_STRING
A constant value to use as the empty string.
|
NOTHING
Modifier and Type | Method and Description |
---|---|
String |
getAsString()
Returns the string representation of this model.
|
static final TemplateModel EMPTY_STRING
String getAsString() throws TemplateModelException
null
, as that will cause exception. (In
classic-compatible mode the engine will convert null
into empty string, though.)
Objects of this type should be immutable, that is, calling getAsString()
should always return the same
value as for the first time.
TemplateModelException