freemarker.testcase.models
Class MultiModel2

java.lang.Object
  |
  +--freemarker.testcase.models.MultiModel2
All Implemented Interfaces:
TemplateMethodModel, TemplateModel, TemplateScalarModel

public final class MultiModel2
extends java.lang.Object
implements TemplateScalarModel, TemplateMethodModel

Testcase to see how FM-Classic deals with multiple Template models.

Version:
$Id: MultiModel2.java,v 1.9 2003/11/28 01:17:07 run2000 Exp $
See Also:
MultiModel1, MultiModel3, MultiModel4, MultiModel5

Constructor Summary
MultiModel2()
          Creates new MultiModel2.
 
Method Summary
 TemplateModel exec(java.util.List arguments)
          Executes a method call.
 java.lang.String getAsString()
          Returns the scalar's value as a String.
 boolean isEmpty()
          Is the model empty?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiModel2

public MultiModel2()
Creates new MultiModel2.
Method Detail

getAsString

public java.lang.String getAsString()
                             throws TemplateModelException
Returns the scalar's value as a String.
Specified by:
getAsString in interface TemplateScalarModel
Returns:
the String value of this scalar.

isEmpty

public boolean isEmpty()
                throws TemplateModelException
Is the model empty?
Specified by:
isEmpty in interface TemplateModel
Returns:
false to indicate the model is not empty

exec

public TemplateModel exec(java.util.List arguments)
                   throws TemplateModelException
Executes a method call.
Specified by:
exec in interface TemplateMethodModel
Parameters:
arguments - a List of String objects containing the values of the arguments passed to the method.
Returns:
the TemplateModel produced by the method, or null.