Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

freemarker.testcase.models
Class NewTestModel  view NewTestModel download NewTestModel.java

java.lang.Object
  extended byfreemarker.testcase.models.NewTestModel
All Implemented Interfaces:
freemarker.template.TemplateModel, freemarker.template.TemplateScalarModel

public class NewTestModel
extends java.lang.Object
implements freemarker.template.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 $

Field Summary
private  java.lang.String string
           
 
Fields inherited from interface freemarker.template.TemplateScalarModel
EMPTY_STRING
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
NewTestModel()
           
NewTestModel(long i)
           
NewTestModel(java.lang.Object o1, java.io.Serializable o2)
           
NewTestModel(java.lang.String str)
           
 
Method Summary
 java.lang.String getAsString()
          Returns the string representation of this model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

string

private final java.lang.String string
Constructor Detail

NewTestModel

public NewTestModel()

NewTestModel

public NewTestModel(java.lang.String str)

NewTestModel

public NewTestModel(long i)

NewTestModel

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

getAsString

public java.lang.String getAsString()
Description copied from interface: freemarker.template.TemplateScalarModel
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 freemarker.template.TemplateScalarModel