freemarker.testcase.models
Class FunctionModel1

java.lang.Object
  extended by freemarker.testcase.models.FunctionModel1
All Implemented Interfaces:
TemplateFunctionModel, TemplateModel

public class FunctionModel1
extends java.lang.Object
implements TemplateFunctionModel

A simple test of the TemplateFunctionModel interface.

Version:
$Id: FunctionModel1.java 1124 2005-10-04 10:48:45Z run2000 $
Author:
run2000

Constructor Summary
FunctionModel1()
           
 
Method Summary
 void callFunction(TemplateWriteableHashModel modelRoot, java.io.Writer out, TemplateRuntimeHandler eventHandler, java.util.List argValues)
          Performs a function on the given data model.
 boolean isEmpty()
          Is the object empty?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionModel1

public FunctionModel1()
Method Detail

isEmpty

public boolean isEmpty()
                throws TemplateModelException
Description copied from interface: TemplateModel
Is the object empty?

Specified by:
isEmpty in interface TemplateModel
Returns:
true if this object is empty, otherwise false
Throws:
TemplateModelException

callFunction

public void callFunction(TemplateWriteableHashModel modelRoot,
                         java.io.Writer out,
                         TemplateRuntimeHandler eventHandler,
                         java.util.List argValues)
                  throws java.io.IOException,
                         TemplateModelException
Description copied from interface: TemplateFunctionModel
Performs a function on the given data model.

Specified by:
callFunction in interface TemplateFunctionModel
Parameters:
modelRoot - the template model root, provides full access to the data model
out - the Writer to which output should be sent
eventHandler - handles any events such as template exceptions
argValues - a List of TemplateModels representing the arguments to the function
Throws:
java.io.IOException
TemplateModelException