freemarker.testcase.models

Class NewTestModel

Implemented Interfaces:
TemplateModel, TemplateScalarModel

public class NewTestModel
extends java.lang.Object
implements TemplateScalarModel

Testcase to see how FreeMarker's ?new built-in deals with constructors.
Version:
$Id: NewTestModel.java,v 1.4 2003/01/12 23:40:25 revusky Exp $

Fields inherited from interface freemarker.template.TemplateModel

NOTHING

Fields inherited from interface freemarker.template.TemplateScalarModel

EMPTY_STRING

Constructor Summary

NewTestModel()
NewTestModel(Object o1, java.io.Serializable o2)
NewTestModel(String str)
NewTestModel(long i)

Method Summary

String
getAsString()
Returns the string representation of this model.

Constructor Details

NewTestModel

public NewTestModel()

NewTestModel

public NewTestModel(Object o1,
                    java.io.Serializable o2)

NewTestModel

public NewTestModel(String str)

NewTestModel

public NewTestModel(long i)

Method Details

getAsString

public String getAsString()
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.
Specified by:
getAsString in interface TemplateScalarModel