freemarker.ext.rhino
Class RhinoFunctionModel
java.lang.Object
freemarker.ext.rhino.RhinoScriptableModel
freemarker.ext.rhino.RhinoFunctionModel
- All Implemented Interfaces:
- AdapterTemplateModel, TemplateBooleanModel, TemplateHashModel, TemplateHashModelEx, TemplateMethodModel, TemplateMethodModelEx, TemplateModel, TemplateNumberModel, TemplateScalarModel, TemplateSequenceModel
public class RhinoFunctionModel
- extends RhinoScriptableModel
- implements TemplateMethodModelEx
- Version:
- $Id: RhinoFunctionModel.java,v 1.2.2.1 2006/12/27 16:10:48 szegedia Exp $
- Author:
- Attila Szegedi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RhinoFunctionModel
public RhinoFunctionModel(Function function,
Scriptable fnThis,
BeansWrapper wrapper)
exec
public Object exec(List arguments)
throws TemplateModelException
- Description copied from interface:
TemplateMethodModelEx
- Executes a method call.
- Specified by:
exec
in interface TemplateMethodModel
- Specified by:
exec
in interface TemplateMethodModelEx
- Parameters:
arguments
- a List of TemplateModel
objects
containing the values of the arguments passed to the method. If the
implementation wishes to operate on POJOs that might be underlying the
models, it can use the static utility methods in the DeepUnwrap
class to easily obtain them.
- Returns:
- the return value of the method, or null. If the returned value
does not implement
TemplateModel
, it will be automatically
wrapped using the environment
object wrapper
.
- Throws:
TemplateModelException