freemarker.testcase.models
Class MethodModel1

java.lang.Object
  extended by freemarker.testcase.models.MethodModel1
All Implemented Interfaces:
TemplateMethodModel2, TemplateModel

public class MethodModel1
extends java.lang.Object
implements TemplateMethodModel2

Simple method model for testing the chaining of method models.

Version:
$Id: MethodModel1.java 1014 2004-10-18 07:18:12Z run2000 $

Constructor Summary
MethodModel1()
           
 
Method Summary
 TemplateModel exec(java.util.List<TemplateModel> arguments)
          Executes a method call.
 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

MethodModel1

public MethodModel1()
Method Detail

isEmpty

public boolean isEmpty()
                throws TemplateModelException
Is the object empty?

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

exec

public TemplateModel exec(java.util.List<TemplateModel> arguments)
                   throws TemplateModelException
Executes a method call. Arguments are passed as a List of TemplateModel objects.

Specified by:
exec in interface TemplateMethodModel2
Parameters:
arguments - a List of TemplateModel objects containing the values of the arguments passed to the method.
Returns:
the TemplateModel produced by the method, or null.
Throws:
TemplateModelException