Package freemarker.template
Interface TemplateMethodModel
-
- All Superinterfaces:
TemplateModel
- All Known Subinterfaces:
TemplateMethodModelEx
- All Known Implementing Classes:
Execute
,JythonHashModel
,JythonModel
,JythonNumberModel
,JythonSequenceModel
,MapModel
,NodeListModel
,NodeListModel
,ObjectConstructor
,OverloadedMethodsModel
,ResourceBundleModel
,RhinoFunctionModel
,SimpleMapModel
,SimpleMethodModel
@Deprecated public interface TemplateMethodModel extends TemplateModel
Deprecated.UseTemplateMethodModelEx
instead. This interface is from the old times when the only kind of value you could pass in was string."method" template language data type: Objects that act like functions. The name comes from that their original application was calling Java methods viaBeansWrapper
.In templates they are used like
myMethod("foo", "bar")
ormyJavaObject.myJavaMethod("foo", "bar")
.
-
-
Field Summary
-
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
exec(java.util.List arguments)
Deprecated.Executes the method call.
-
-
-
Method Detail
-
exec
java.lang.Object exec(java.util.List arguments) throws TemplateModelException
Deprecated.Executes the method call. All arguments passed to the method call are coerced to strings before being passed, if the FreeMarker rules allow the coercion. If some of the passed arguments can not be coerced to a string, an exception will be raised in the engine and the method will not be called. If your method would like to act on actual data model objects instead of on their string representations, implement theTemplateMethodModelEx
instead.- Parameters:
arguments
- a List of String objects containing the values of the arguments passed to the method.- Returns:
- the return value of the method, or
null
. If the returned value does not implementTemplateModel
, it will be automatically wrapped using theenvironment object wrapper
. - Throws:
TemplateModelException
-
-